Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does statement "abc: {..}" mean? [duplicate]

Tags:

java

syntax

I have never come across such expression in Java. It is not even a switch case

 //no code above to make it look like a switch case or loop

 abc: {
    // do some stuff
      break abc;
 }

Do you have any idea what this does?

like image 609
David Prun Avatar asked Oct 20 '22 12:10

David Prun


1 Answers

They are labels, see http://docs.oracle.com/javase/tutorial/java/nutsandbolts/branch.html for a complete explanation.

like image 200
Mike B Avatar answered Nov 15 '22 05:11

Mike B