I have Follwing problem
There can be more classes like A & B in module.
i want that in the class D whenever i will call Method m2 of C passing string as
a NAME of calss it shd invoke the method m1 of respected class.
If still u r not clear just read the code once ..
class A{
public m1(){
}
}
class B{
public m1(){
}
}
class C{
public m2(String strName){
}
}
Class D{
C c_obj = new C();
c_obj.m2("A");//this shd invoke method m1 of class A
c_obj.m2("B");//this shd invoke method m1 of class B
}