Java Program Structure

A Java program may contain many classes of which only one class defines the main method. Classes contain data members and methods that operate on the data members of the class. Methods may contain data type declaration and executable statements. To write a java program, we first define classes and then put them together. A Java program may contain one or more section are shown as following in Fig:
Java