I'd like to know what's the type of the object which is calling a method in another class in Java, e.g. :
class A{
public A(){
//..
}
public void method1{
//here I'd like to find what's the type of the object which is calling this method
}
}
class B{
public B(){
A a = new A();
a.method1();
}
}
class C{
public C(){
A a = new A();
a.method1();
}
}