public class Base{private void say (int number){
System.out.println ("Base: "+number);
}
}
public class Over extends Base{
public void say (int number ){
System.out.println ("Over: "+number);
}
public static void main (String[] args){
Over over=new Over () ;
over.say (12);
}
}
|
|