January 2014
Intermediate to advanced
736 pages
70h 43m
English
Welcome to Java Programming! can be displayed several ways. Class Welcome2, shown in Fig. A.3, uses two statements (lines 9–10) to produce the output shown in Fig. A.1.
1 // Fig. A.3: Welcome2.java 2 // Printing a line of text with multiple statements. 3 4 public class Welcome2 5 { 6 // main method begins execution of Java application 7 public static void main( String[] args ) 8 { 9 System.out.print( "Welcome to " ); 10 System.out.println( "Java Programming!" );11 } // end method main12 } // end class Welcome2
Welcome to Java Programming!
Fig. A.3 | Printing a line of text with multiple statements.
The program is similar ...
Read now
Unlock full access