Play audio slide show -- Keyboard shortcut: 'x'  Back to slide -- Keyboard shortcut: 'u'              Play sound for this slide -- Keyboard shortcut: 'y'  RedefTry4.java - Metoden m, som er privat i A, forsøges redefineret som en offentlig metode.Lecture 7 - slide 36 : 41
Program 1

class A {
 private int v = 5;

 private void m(int p){
   v = p;
 }

}

class B extends A{

 private int v = 6;

 public void m(int p){
   v = p;
   super.m(p-3);  // giver fejl
 }

}


class RedefTry4 {

 public static void main (String[] args){

   B aB = new B();
   aB.m(10);

 }

}