public class withoutmain{ static{ System.out.println("without the main method"); System.exit(0); } } What is the result of attempting to compile and run the program ?
Compile failure
sucessfully compiled, but through exception in run time.
It runs sucessfuly and prints "without the main method"
It runs sucessfuly, but No output.