/* * File: Example.java * Author: Java, Java, Java * Description: This class illustrates the basic structure * of a Java application program. */ public class Example extends Object // Class header { // Start of class body private double num = 5.0; // Instance variable public void print() // Method definition header { // Start of method body System.out.println(num); // Output statement } // print() // End of print method body public static void main(String args[]) // Method definition header { // Start of method body Example example; // Reference variable declaration example = new Example(); // Object instantiation statement example.print(); // Method call } // main() // End of method body } // Example // End of class body