Hello, Hiba.
I think the text editor interpreted your "semicolon, right parenthesis" as a smiley face.
If this is true, then
is one way of creating an infinite loop in
Java. It is identical to
.
I agree with you, it's not an intuitive construct; I mean, you can't look at it, and immediately discern what's going on. In real life, I use the
format.
Art