what is return statement in java??
Answers
Answered by
5
Answer:
A return statement causes the program control to transfer back to the caller of a method. Every method in Java is declared with a return type and it is mandatory for all java methods. A return type may be a primitive type like int, float, double, a reference type or void type(returns nothing).
Answered by
57
QUESTION:-
what is return statement in java??
ANSWER:-
A return statement is used to exit from a method, with or without a value. For methods that define a return type, the return statement must be immediately followed by a return value. For methods that don't return a value, the return statement can be used without a return value to exit a method.
I HOPE IT'S HELPS
THANKS
GOOD AFTERNOON
HAPPY INDEPENDENCE DAY
Similar questions