Next:
No goto Statement
Up:
Flow control and loops
Previous:
continue
Contents
return
Terminates execution of a method and returns to the invoker.
If the method has a return type, the return must include an expression of a type that could be assigned to the return type.
public static double absolute (double val) { if ( val<0 ) return -val; else return val; }
Next:
No goto Statement
Up:
Flow control and loops
Previous:
continue
Contents