Question 11
Back to Exercise
When does an instance initialiser block { … } run?
- A Once, when the class loads
- B For every new object, after the superclass constructor and before the rest of this constructor's body Correct
- C After the constructor finishes
- D Only when called explicitly
Correct Answer: Option B
It runs together with field initialisers, in source order.
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!