exam questions

Exam 1z0-808 All Questions

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

Exam 1z0-808 topic 1 question 225 discussion

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

Given the content of the Customer.java and Trader.java files:

Which two methods can be overridden in the Trader class from the Customer class? (Choose two.)

  • A. m2()
  • B. m3()
  • C. m4()
  • D. m1()
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

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
iSnover
Highly Voted 2 years, 2 months ago
Selected Answer: BD
An erratum to my previous comment, the correct one is BD - B: m3 is protected, but can be accessed if the other class extends the parent class even though it is in a different package. - D: m1 is public, just by importing the package you can access it normally.
upvoted 5 times
...
MPignaProTech
Most Recent 2 months, 2 weeks ago
Selected Answer: BD
BD are corrects
upvoted 1 times
...
tawa_z58
1 year, 11 months ago
BD corect .AC not because as , you can not override the private method in Java because it's bonded during compile time using static binding. It's also not visible on sub-class so cannot be overridden but you can hide the method by declaring another private method of the same signature
upvoted 3 times
...
Rajeevkuamr
1 year, 12 months ago
BD,Only the public and protected methods can be overriden
upvoted 4 times
...
iSnover
2 years, 3 months ago
Selected Answer: AB
The correct answer is AB, talking about overloading and it has 4 methods that have 4 different types of visibility, following this logic, the ones that have less visibility are the AB responses, remember that when a method does not come with its declared visibility, java sets visibility to "default" by default which is more restricted than private.
upvoted 2 times
...
shivkumarx
2 years, 4 months ago
Private methods can not be overridden so answer is wrong Answers should be BD
upvoted 3 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago