Look at the following code and choose the right option for the word <access-modifier>:
// Shape.java// w w w . j a v a2s .co m public class Shape { protected void display() { System.out.println("Display-base"); } } // Circle.java public class Circle extends Shape { <access-modifier> void display(){ System.out.println("Display-derived"); } }
B.
You can provide only a less restrictive or same-access modifier when overriding a method.