public class Outside { 2 3 private int a; 4 5 public void foo(int b) { 6 int c = a; 7 int d = b; 11 } 8 class Inside { 9 public Inside() { 10 // What can I see here? 12 } 13 Inside e = new Inside(); 14 } 15 16 } Question Which variable is visible at line 10 above? Choice 1 a Choice 2 b Choice 3 c Choice 4 d Choice 5 e
You will have to put something like "System.out.println(a)" in line 10 and keep trying until it compiles. And also see what happens if you actually run it.
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.