Why should I avoid using Java Label expressions?

Throughout the internet, people say you should avoid using shortcut operators in java. However, I find them very useful in some cases, namely nested loops.
I cannot find satisfactory answers on why not use them. I think alternatives to shortcuts often reduce either readability, or performance, or both.

So, what makes tagged break and continue declarations so bad?

+5
source share
4 answers

Shortcuts are perfect for breaking from nested loops.

 

PS: ( , . ), , return, " ". , , .

+9

, , . . , .

+1

, . , ( ) ; , , , . , . . , , , , , , .

+1

, , .

However, if there is a need for breaks and continue operations, just do a quick check if the method is still sufficiently concatenated.

0
source

All Articles