Oracle
1Z0-815 · Question #69
Given: Which two allow a.Main to allocate a new Person? (Choose two.)
The correct answer is C. In Line 2, add extends Person to the Main class E. In Line 1, remove the access modifier. See the full explanation below for the reasoning.
Question
Given:
Which two allow a.Main to allocate a new Person? (Choose two.)
Exhibit
Options
- AIn Line 1, change the access modifier to private
- BIn Line 1, change the access modifier to public
- CIn Line 2, add extends Person to the Main class
- DIn Line 2, change the access modifier to protected protected class Main {
- EIn Line 1, remove the access modifier
How the community answered
(25 responses)- A4% (1)
- B12% (3)
- C76% (19)
- D8% (2)
Community Discussion
No community discussion yet for this question.
