My java code has an obvious error. Why does it compile and run?

java, syntax

Solution

The `http:` is a Label Statement. See here also.

The `//www.google.com` portion is then interpreted as a `//` comment.

Problem

``` public class HelloWorld { public static void main (String args[]){ System.out.println ("Hello "); http://www.google.com System.out.println ("World!"); } } ``` The above code is just compiling and executing fine. Why the compiler is not reporting any error?

Original source