Home Segments Top Top Previous Next

38: Mainline

Following the name of the class, Demonstrate, you come to the body of the class definition. In the example, the body contains a single method definition—the one for the main method—which computes the rating of a movie, given ratings for the movie's script, acting, and direction.

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