How many instance initializers are in this code?
1: public class MyClass { 2: { System.out.println(); } 3: public MyClass () { 4: System.out.println(); 5: } 6: static { System.out.println(); } 7: { System.out.println(); } 8: } ?
C.
Lines 2 and 7 illustrate instance initializers.
Line 6 is a static initializer.
Lines 3-5 are a constructor.