class OuterClass {
// The below object will be initiated somewhere within
private OuterClass.InnerClass innerClassObj;
private class InnerClass {
{
int innerClassVariable;
}
}
}
class SomeOtherClass {
public static void main(String args[])
{
OuterClass outerClassObj = new OuterClass();
}
}
I need to access the field 'innerClassvariable' present in 'InnerClass' Using 'innerClassObj' present in 'OuterClass' from 'SomeOtherClass'
Aucun commentaire:
Enregistrer un commentaire