You need to sign in to do that
Don't have an account?
Hetal Sheth
public class A{
public class B {
}
public class C {
public A.B show(){}
}
}
------------
Look above exampe. I have one inner class C.I need to create instance of that class.
Can any one help me to create instance of class C and call method show of class C.
Need help in access inner class in apex
public class A{
public class B {
}
public class C {
public A.B show(){}
}
}
------------
Look above exampe. I have one inner class C.I need to create instance of that class.
Can any one help me to create instance of class C and call method show of class C.
u can create instance for above as follows:
A.C obj = new A.C();
n using obj u can call the method.
Thanx and Regards,
Mrunali Gaonkar
But my classes are not static.
If my classes are static than I can call by above way.
public class Sub_Class{
}
public class Sub_Inner_Class{
Maain_Class.Sub_Class class_ins = new Maain_Class.Sub_Class();
public Maain_Class.Sub_Class show_method(){
return class_ins;
}
}
}
hope it helps... HAPPY SALESFORCE :) :)
WE CANNOT CREATE MULTIPLE INNER CALSSES...
FOLLOW THE LINK..
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_defining.htm