How to use the return to retrieve a value out of an if statement? I don’t want to return immediately, just like that:
if(){
return "something";
}
This isn’t working for me, because if the return is successful the method returns, but I need to return it and when the return is complete to continue the actions in the method.
If you want to “return” values from a method without actually
returning from the message, then you have to define setter methods on the calling class and call them, like this:And the
Worker