One
Consider the code below.
1. Will it compile?
2. If so what is the output?
3. If not, why not, and how would you fix it?
public class Foo {
private int count = 1;
public static void main(String []args) {
new Bar();
}
}
class Bar extends Foo {
public Bar() {
System.out.println(count);
}
}