Q:

Why hyperlink in Java source code does not produce compile error?

In the source code I forgot to add comment before the link.
For example, the following code:
public class HelloWorld
{
  public static void main(String[] args)
  {
    http://www.example.com/random-link-here
    System.out.println("Hello World!");
  }
}

Why it compiles? Somehow unable to figure out what it does... Its like label for Goto + comment, but Java does not have a goto...

A:

The http: part is a label labelling the statement that follows. The // part introduces a line comment.
Normally you see labelled statements in directed break situations, like:
outer:
for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
         if (someConditionThatNeedsToTakeUsOutOfBothLoops) {
             break outer;
         }
    }
}

...however any statement may have a label. In your case you've labelled the System.out.println("Hello World!"); statement.

A:

Because  :
http:   //www.example.com/random-link-here
^^^^    ^--------------------------------^

http: is a label and the rest is a comment 

