Home Segments Top Top Previous Next

41: Mainline

To relieve programs of their catatonia, you can include display statements that tell the Java compiler that you want information to be displayed, as in the following revised program, which, when executed, displays The rating of the movie is 23:

public class Demonstrate { 
 public static void main (String argv[]) { 
  System.out.print("The rating of the movie is "); 
  System.out.println(6 + 9 + 8); 
 } 
} 

The revised program introduces several new concepts. Accordingly, you need to zoom in, and to look at it piece by piece.