Question 4
Back to Exercise
What does the compiler-generated default constructor do?
- A Sets all fields to null
- B Calls the superclass no-arg constructor (super()); fields keep their initial values Correct
- C Nothing – it is empty with no super call
- D Prints the class name
Correct Answer: Option B
Field initialisers still run as usual.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!