Play audio slide show -- Keyboard shortcut: 'x'  Back to slide -- Keyboard shortcut: 'u'              Play sound for this slide -- Keyboard shortcut: 'y'  StaticDynamicTypes.java - Et tilsvarende komplet Java program.Lecture 7 - slide 27 : 41
Program 1

class A {
  int v = 5;

}

class B extends A {
  int w = 6;
}


class StaticDynamicTypes {

  public static void main (String[] args){

    A x = new A();
    B y = new B();

    x = y;     // OK
    y = x;     // Problemer. Kan ikke oversættes.

    y = (B)x;  // OK med cast

  }
}