Constructors — Chapter Test

Answer all 5 questions, then submit. You need 60% to pass. Log in to save progress.

Question 1
A constructor must have…
Athe return type void
Bthe same name as the class
Cat least one parameter
Dthe name main
Question 2
A constructor that takes no parameters and sets fixed defaults is a…
Aparameterised constructor
Bdefault constructor
Cstatic method
Dpure method
Question 3
Having several constructors with different parameter lists is…
Aoverriding
Bconstructor overloading
Cencapsulation
Drecursion
Question 4
When does a constructor run?
AWhen you call it by name
BAutomatically when an object is created
COnly once per program
DWhen the program ends
Question 5
Unlike a method, a constructor has…
Aa return type
Bno return type
Cthe name main
Dno name