2.1 Java Application Structure

Every Java program consists of at least one class. It is impossible to write a Java program that doesn’t use classes. Classes describe a logical entity that has data as well as methods (the instructions) to manipulate that data. An object is a physical instantiation of the class that contains specific data. In Example 2.1 we provide a shell that contains the basic format of a Java application with a class name of ShellApplication. Our source code will use this format, changing the class name as appropriate.

Get Java Illuminated, 5th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.