Question 7
Back to Exercise
A class has fields int age; String name; boolean active;. What are they right after new (no constructor code)?
- A Random values
- B 0, null, false Correct
- C 0, "", false
- D Compile error
Correct Answer: Option B
Fields always get default values.
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!