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

1 Expert Approved Answer
Step: 1 Unlock

b and e A constructor can be declared as private but this means that this co... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!