exam questions

Exam 1z0-803 All Questions

View all questions & answers for the 1z0-803 exam

Exam 1z0-803 topic 1 question 18 discussion

Actual exam question from Oracle's 1z0-803
Question #: 18
Topic #: 1
[All 1z0-803 Questions]

Given a java source file:

What changes will make this code compile? (Select Two)

  • A. Adding the public modifier to the declaration of class x
  • B. Adding the protected modifier to the x() constructor
  • C. Changing the private modifier on the declaration of the one() method to protected
  • D. Removing the Y () constructor
  • E. Removing the private modifier from the two () method
Show Suggested Answer Hide Answer
Suggested Answer: CE 🗳️
Using the private protected, instead of the private modifier, for the declaration of the one() method, would enable the two() method to access the one() method.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Nate88890123
3 years, 3 months ago
Why E? I checked it and it runs fine.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...