Question 11


What will happen if you compile/run the following code? 1: public class Q11 2: { 3: static String str1 = "main method with String[] args"; 4: static String str2 = "main method with int[] args"; 5: 6: public static void main(String[] args) 7: { 8: System.out.println(str1); 9: } 10: 11: public static void main(int[] args) 12: { 13: System.out.println(str2); 14: } 15: } A) Duplicate method main(), compilation error at line 6. B) Duplicate method main(), compilation error at line 11. C) Prints "main method with String[] args". D) Prints "main method with int[] args".