logo

Crowdly

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

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

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%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.spit.ac.in?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!