• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does this make sense?

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a very basic doubt...

If in an activity, I have following two statements:



Will the return statement really execute? If it wont, I would expect an "Unreachable statement warning" signaled by the compiler. By I did not get any. Am I missing something here. Perhaps, the control does not go back right away on the call to finish()?


Thanks..
 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The call to finish() tells Android to close up the activity at the next opportunity. It will do so shortly after you return from whatever callback method you were in when you called finish().
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic