The next lesson covers the same material for applets. An application is created from classes. So you could, for example, store a text string in one field, an integer in another field, and a floating point in a third field. For example, a very simple class might store a string of text and define one method to set the string and another method to get the string and print it to the console. Methods that work on the data are called accessor methods.
Every application needs one class with a main method.
This class is the entry point for the program, and is the class name passed to the java interpreter command to run the application. The code in the main method executes first when the program starts, and is the control point from which the controller class accessor methods are called to work on the data. Here, again, is the example program from Lesson 1. It has no fields or accessor methods, but because it is the only class in the program, it has a main method. While the class describes the data and behavior, you need a class instance to acquire and work on data.