r/javahelp • u/[deleted] • Jun 08 '16
Need help with question
class A{
static class B{}
static class C{ B b;
C(B b){this.b=b;}
int foo(){return 42;}
}
}
public class Exercise{
public static void main(String [] arg){
assert ([???].foo()==42);
}
}Gotta full in the ???
0
Upvotes
1
u/Protagoras Jun 08 '16
I'm sorry there exists no valid answer. You cannot create a valid Java statement by substitution of the "???" substring.