Java protected Access Modifier
class ProtectedExample { protected int value=100; protected void print() { System.out.println(“The value is=” +value); } } class Test extends ProtectedExample { public void show() { print(); } public static void main(String args[]) { Test t=new Test(); t.show(); System.out.println(t.value); }}