logo

Crowdly

What is the output of the below Java program with overloaded constructors? pu...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What is the output of the below Java program with overloaded constructors?

public class Constructor3

{

  int birds=10;

  Constructor3()

  {

    this(20);

  }

  Constructor3(int birds)

  {

    System.out.println("Birds=" + birds);

  }

  public static void main(String[] args)

  {

    Constructor3 con = new Constructor3();

  }

}

0%
100%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.spit.ac.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!