+ 1
Which of the following is/are true about constructors in Java?
1) Constructor name should be same as class name. 2) If you don't define a constructor for a class, a default parameterless constructor is automatically created by the compiler. 3) The default constructor calls super() and initializes all instance variables to default value like 0, null. 4) If we want to parent class constructor, it must be called in first line of constructor.
4 Réponses
+ 1
1 2 3 4 all are correct
+ 3
ok then hooray
+ 2
all are true (1,2,3,4)
0
all 4