adrianjohnson
Programmer
I'm quite new to Java, and I have an easy problem (well, it must be ...). I have a method such as:
void heresmymethod
{
if (something happens)
do something
// leave the method
else
do something else
other stuff in the method
}
What is the code for the // leave the method line? I can't find examples anywhere (not looking in the right place?). I've tried exit and return.
The method which calls this one is the action performed on a button on an input screen (dialog), so I'd like the screen to go away, leaving the other screen (already open anyway) on the screen.
Hope this makes sense. If not, let me know and I'll try and explain things a bit better.
Adrian Johnson
Assystance - i.t. solutions
void heresmymethod
{
if (something happens)
do something
// leave the method
else
do something else
other stuff in the method
}
What is the code for the // leave the method line? I can't find examples anywhere (not looking in the right place?). I've tried exit and return.
The method which calls this one is the action performed on a button on an input screen (dialog), so I'd like the screen to go away, leaving the other screen (already open anyway) on the screen.
Hope this makes sense. If not, let me know and I'll try and explain things a bit better.
Adrian Johnson
Assystance - i.t. solutions