Every Java program needs a class defined in the file. You can define more than one class in a file and atleast one class as public and its name should be that of the file. In that public class you define main() method with public static void which is the trigger point for the java interpreter.
In my openion each program must have a class.
katharnakh.
Full and self expalanatory!
Thanks!
Reputation Points: 462
Solved Threads: 392
Senior Poster
Offline 3,681 posts
since Jun 2007