Question: Which statements are true? Select the two correct answers. (a) A class must define a constructor. (b) A constructor can be declared private. (c) A
Which statements are true?
Select the two correct answers.
(a) A class must define a constructor.
(b) A constructor can be declared private.
(c) A constructor can return a value.
(d) A constructor must initialize all fields when a class is instantiated.
(e) A constructor can access the non-static members of a class.
Step by Step Solution
3.44 Rating (160 Votes )
There are 3 Steps involved in it
b and e A constructor can be declared as private but this means that this co... View full answer
Get step-by-step solutions from verified subject matter experts
