0

What is the difference between BREAK and RETURN statement used after SWITCH Cases?

27th Apr 2019, 6:59 PM
TheEngineerIN
TheEngineerIN - avatar
4 Respuestas
+ 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
27th Apr 2019, 7:05 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Thanks Elva !!🙌 Thanks Denise Roßberg !!🙌
27th Apr 2019, 7:07 PM
TheEngineerIN
TheEngineerIN - avatar
27th Apr 2019, 7:15 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Break kills only switch, return kills entire function
27th Apr 2019, 7:05 PM
Elva
Elva - avatar