next up previous
Next: Write, compile, and execute Up: Unit 01 Previous: The first Java program

Second program

public class Second {
  public static void main(String[] args) {
    System.out.println("This is my second Java program ...");
    System.out.println("... and it will not be my last one.");
  }
}

The sequence of two statements means that the two statements will be executed in the order in which they appear in the program.


next up previous
Next: Write, compile, and execute Up: Unit 01 Previous: The first Java program