title: How does the method onActivityResult() work in Android?
body: <p>The parameters of a method is used to pass some data I guess. But I'm just confused how it is working over here in this example.</p>
  
  <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  if (data == null) {
   return;
  }
  mIsCheater = data.getBooleanExtra(CheatActivity.EXTRA_ANSWER_SHOWN, false);
  }
  </code></pre>
  
  <p>PS: I'm a newbie. Started learning Android from a book just few days back. </p>