I think they are looking for a simple "return".
Any time you are inside a function, you can exit that function by a
"return".
All of the Android specific things like onCreate, etc. are functions and can
all be exited by a "return".
Just make sure you return whatever type is needed as a return value. If it
is void, then just "return" is enough.
@Override
public void onCreate( Bundle savedInstanceState ) // Doesn't need a return
value since it is void
{
super.onCreate( savedInstanceState );
setContentView( R.layout.main );
if( something > 0 ) return;
// do something else here you might want to skip
}
public int getInt() // Needs an int return value
{
int someInt = 7;
return someInt;
}
Simple as that.
Steven
Studio LFP
http://www.studio-lfp.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en