Millionaire Mode

programming languages Online Quiz - 150

Question 1 of 13

What results from the following code? 1. class MyClass 2. { 3. void myMethod(int i) {System.out.println("int version");} 4. void myMethod(String s) {System.out.println("String version");} 5. public static void main(String args[]) 6. { 7. MyClass obj = new MyClass(); 8. char ch = 'c'; 9. obj.myMethod(ch); 10. } 11. }

  1. The code compiles and produces output: int version.
  2. Line 9 will not compile as there is no version of myMethod which takes a char as argument.
  3. An exception at line 9.
  4. Line 4 will not compile as void methods can't be overridden.

Prize Money

15₹7 Crores
14₹1 Crore
13₹50,00,000
12₹25,00,000
11₹12,50,000
10₹6,40,000
9₹3,20,000
8₹1,60,000
7₹80,000
6₹40,000
5₹20,000
4₹10,000
3₹5,000
2₹2,000
1₹1,000