Millionaire Mode
Java Programming Fundamentals Practice Test
Question 1 of 25
What will be the output of the program?
class Super
{
public int i = 0;
public Super(String text) /* Line 4 */
{
i = 1;
}
}
class Sub extends Super
{
public Sub(String text)
{
i = 2;
}
public static void main(String args[])
{
Sub sub = new Sub(Hello);
System.out.println(sub.i);
}
}
- 0
- 1
- 2
- Compilation fails
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