G
Guest
class MainClass {
static public int main(String[] args) {
MainClass a = new MainClass(); // <-- here!
OtherClass b = new OtherClass();
}
..................
}
class OtherClass {
private void aMethod() {
MainClass f = getMainObject(); // <-- and here!
}
}
-----------------------------------------
Can you implement "getMainObject()" to return the "a"?
(a instanceof MainClass)
thanks
static public int main(String[] args) {
MainClass a = new MainClass(); // <-- here!
OtherClass b = new OtherClass();
}
..................
}
class OtherClass {
private void aMethod() {
MainClass f = getMainObject(); // <-- and here!
}
}
-----------------------------------------
Can you implement "getMainObject()" to return the "a"?
(a instanceof MainClass)
thanks