Home Segments Top Top Previous Next

31: Mainline

To arrange for your arithmetic expression to be evaluated, you define main, inside a class definition, such that the arithmetic expression appears in that method.

public static void main (String argv[]) { 
 6 + 9 + 8; 
} 

To understand the main definition, you need to zoom in to look at it piece by piece. Then, to use the main definition, you embed it in a class definition, as you learn, in Segment 35.