Why aren't default boolean methods of type void?

  • Thread starter Thread starter AC Question
  • Start date Start date
A

AC Question

As I'm getting more familiar with Android programming, boolean methods such as onCreateOptionsMenu() and onOptionsItemSelected() become really confusing. I mean, why are they of type boolean and not void? What's the use of the returned value? And, of course, when should I decide to return false and when to return true?
 

Trending Posts

Forum statistics

Threads
956,259
Messages
6,967,251
Members
3,163,496
Latest member
Faultier