Java syntax with " : " [duplicate]

This question already has an answer here:

I’ve seen this character used in c# like an extends in Java, but recently I found this in a code

loop: while (!stop) {}

and also “pockets: “….it is followed by a for and inside that for there’s “break pockets;”
And I have no idea what that it means. I would appreciate any explanation.

Source: syntax

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.