package p1;
class A
{
protected void show()
{
Syatem.out.println("Hello");
}
}
This is file B.java
class B extends p1.A
{
protected void show()
{
A ob=new A();
ob.show();//This shows that show in A is protected cant be acceded in B[why, while we have inherited A into B]
System.out.println("Hello");
}
}