0
What is the difference between BREAK and RETURN statement used after SWITCH Cases?
4 Answers
+ 2
Java:
break --> jump out of the switch statement
no break --> execute next case
return --> stop program
Or if you use return in a method
--> return value, jump back to the class where the method was called
+ 2
Thanks Elva !!đ
Thanks Denise RoĂberg !!đ
+ 2
Akshay Biradar
Here is a code where you can see it.
https://code.sololearn.com/c3HpSRKPqQN8/?ref=app
+ 1
Break kills only switch, return kills entire function