Home Segments Top Top Previous Next

174: Mainline

Just as you can combine variable declaration and initialization for a variable that has integral or floating-point type, you also can combine declaration and initialization of a variable with a class as its type:

  *-- Class name 
  |   *-- Variable name 
  |   |    *-- Keyword 
  |   |    |    *-- Class name 
  v   v    v    v 
Movie m = new Movie();