What is the output for the following lines of code? 1: public class Q8 2: { 3: int i = 20; 4: static 5: { 6: int i = 10; 7: 8: } 9: public static void main(String[] args) 10: { 11: Q8 a = new Q8(); 12: System.out.println(a.i); 13: } 14: }
Compilation error, variable "i" declared twice.
Compilation error, static initializers for initialization purpose only.
Prints 10.
Prints 20.