In one of the forum I found below code as a question:
public class Test{
public static void main(String[] args){
System.out.println("Hello");
Test:
System.out.println("World");
}
}
And asked what would be the result ?
I thought it would be a compile time error, since I have not seen Test:
code in java.
I was wrong, surprisingly both line is printed after compiling and running above code.
Can any one tell me what is the use of this Test:
kind of code ? And why it is not throwing error ?