Monday, November 1, 2010

Structure of a Java Program

Java programs always consist of  one or more classes. Where you typically put the program code for each class in a separate file, and you must give each file the same name as that of the class that is defined within.

A java file must have the extension (.java) thus your file containing the class student will be called student.java
and a file contain a class called employee will have the file name as employee.java

No comments:

Post a Comment