Tips of JAVA Programming

@suryan (45)
India
December 23, 2006 12:12pm CST
Dear Friends, Do you know how to write a java program without using main.If no,then i will guide you.This is simple program . class A { static { System.out.println("Program without main"); System.exit(); } } This program looks simple but how it executes .It is difficult to predict as the code is without main.As the program get executes it enters in static loop and print Program without main.And the next statment is System.exit().So it come out of the program.So the program executes without main.
No responses