Java Practice It | Self-Check 8.17 whatIsAConstructor | classes, constructors

preview_player
Показать описание
More practice its:

Problem:

Question:

Which of the following statements about constructors are true? Check all that apply.
A constructor is a special method that creates an object and initializes its state.
A class can have many methods but only one constructor.
A constructor can be used instead of fields to represent the data inside a class.
A constructor is declared without a return type.
Constructors are considered bad programming style and should be avoided.
A constructor is the code that is called when you use the 'new' keyword.
A constructor wastes memory in the computer so it should be used sparingly.
(order shuffled)
Рекомендации по теме