Java-3 online test, online practice test, exam, quiz

Online Practice Test > Java-3        (Total 22 questions)        (Time spent 0:0)

1. Java Constructor

class Nest
{

Nest()
{
System.out.print("Nest");
}

Nest (long l)
{
this();
System.out.print(l);
}

Nest(int i)
{
this(i);
System.out.print(i*2);
}

}


Public static void main(String[] args)
{
int i = 4;
new Nest(i);
}

What would be the output?




   View Answer and Discussion
Advertisement