Play audio slide show -- Keyboard shortcut: 'x'  Back to slide -- Keyboard shortcut: 'u'              Play sound for this slide -- Keyboard shortcut: 'y'  DeclarationsDemo.java - Et Java program med forskellige erklæringer.Lecture 3 - slide 8 : 39
Program 1

class DeclarationsDemo {

  static final double PI = 3.14159;
  static int a = 2;
  
  public static void main (String[] args) {
    System.out.println("pi er " + PI);
   
    double aNumber = 2 * PI;
    int a = 6, b = 5;
  
    System.out.println("aNumber = " + aNumber +
                       " og a = " + a);
  }

}