next up previous
Next: Second program Up: Unit 01 Previous: Java

The first Java program

import java.lang.*;

public class First {
  public static void main(String[] args) {
    System.out.println("This is my first Java program.");
  }
}

The statements have the following meaning:

Note: Java is case-sensitive, i.e., there is a difference between lower-case and upper-case letters. E.g., class is different from Class.


next up previous
Next: Second program Up: Unit 01 Previous: Java