hello friends, generally we know that the execution of any java program always starts from main method and without main, no program will compile. But it does. I found the following code from net....it is without main method, surprisingly it compiles and runs smoothly.
The vast majority of java classes do not have main method. The compiler doesn't care whether or not a class has a main method.
The program quits before the class is initialized, so the JVM never gets a chance to determine that the main method is missing (which it would, and exit the program with an error message, if the call to exit were removed). I wouldn't call that "running smoothly".
Ping & DNS - updated with new look and Ping home screen widget