IBM
C2170-010 · Question #12
Examine the following piece of code: [Image of Java code snippet: serverworkshop.impl.MaintainPerson] Which of the following statements about this piece of code is true?
The correct answer is C. It does not compile because the MaintainPerson should not extend the class serverworkshop.intf.MaintainPerson. See the full explanation below for the reasoning.
Question
Examine the following piece of code:
[Image of Java code snippet: serverworkshop.impl.MaintainPerson]
Which of the following statements about this piece of code is true?
Options
- AIt does not compile because an import statement is missing
- BIt does not compile because the PersonDtils object must be obtained from a factory class
- CIt does not compile because the MaintainPerson should not extend the class serverworkshop.intf.MaintainPerson
- DIt compiles without errors
How the community answered
(41 responses)- A12% (5)
- B2% (1)
- C78% (32)
- D7% (3)
Community Discussion
No community discussion yet for this question.