title: Passing data back into a previous activity in Android Studio
body: <p>We have been learning how to open new Activities, in class, but so far the second activity runs its logic from the <code>OnCreate()</code> class.</p>
  
  <p>I am wanting to return directly to activity one, from activity two, but run a function in its java when I do so. </p>
  
  <p>All I've been able to find on the matter is how to effectively write my own "back" button.</p>
  
  <p>I am needing to pass a string, as well as an int, that was originally sent from activity one to activity two. I need to compare the received int with the sent int to confirm it is coming from the same source.</p>
  
  <p>My biggest problem is that we were taught to use <code>OnCreate()</code>. <strong>This will not work on returning to an Activity, as OnCreate only runs when the instance is first created. If I am creating the instance as I move back, my other function will not work.</strong></p>