Consider the following code and choose the right option for the word <access-modifier>:.
// Shape.java/* ww w. jav a2 s .com*/ 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.