Please watch the following code, I have a query about it.
Basically there are two classes Test2 & Test3 in the two different packages.
package test1;
public class Test2
{protected int test=8;}
package test3;
import test1.*;
class Test3 extends test1.Test2
{
//static int test5=getTest();
static Test3 t=new Test3();
public static void main(String a[])
{
System.out.println(t.test);
t.toString();
}
}
Now class Test3 extend Test2.As Object is the root class then Test2 has java.lang.Object class as it's superclass.
So Test3 class indirectly inherits the Object Class.
No my query is that :
Object class has only two methods protected remaning are default(no access outside the package.)
Then is that means the class Test3 does not have access the other methods of Object class such as equals(),hashcode.