Millionaire Mode

Programming in Java

Question 1 of 10

What is the output of the following program?
import java.io.*;
class sample3
{
int a;
int b;
sample3()
{
a=0;
b=0;
}
sample3(int b1,int c1)
{
a=b1; b=c1;
}
final void print()
{
System.out.print(a);
System.out.print(b);
}
}
class sample31 extends sample3
{
int c;
sample31()
{
c=0;
}
sample31(int c)
{
this.c=c; super(4,5);
}
public static void main(String args[])
{
sample3 ob1=new sample3(4,5);
sample31 ob=new sample31();
System.out.print(ob.a);
System.out.print(ob.b);
System.out.print(ob.c);
sample31 ob2=new sample31(5);
System.out.print(ob2.a);
System.out.print(ob2.b);
System.out.print(ob2.c);
}

  1. Cannot call super class constructor
    Call to the super must be first in the constructor.
  2. 000455
  3. 000005
  4. 000450
  5. 000000

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