If you have a program like this:
public class ABC
public static void main(String args)
The reason the program compiles without error is that the program considers
http: as a label, which is allowed in Java, and is mostly used with loops.
The second part, i.e.,
//example.com is a comment, due to the
//, and is therefore ignored by the compiler.
Hence it compiles properly.