in this case the only two good ones represent its A and B, the Implementation of an abstract method in the child class can be private in note case it does not prevent the compilation, instead the method revolve and declared protected so the child class this method can be declared minimum protected or lower public, thus the answer and A, B
The answer whould be BC or AC.
Both A and B are correct answers unfortunately.
Note that in these options what is being analyzed is an override and not an implementation of an abstracted method.
The oracle documentation states that the access modifier in this case could be the same or allow for greater visibility, not less. Which makes options A and B correct.
If the question is correct, it remains to be seen what is the best practice or convention in this regard.
https://docs.oracle.com/javase/tutorial/java/IandI/override.html
About the answer:
I choose AC.
Whereas, the abstract class is a pseudo-model to follow. I would keep the same access modifier already informed in it.
Another no less relevant issue is having confidence in this simulated exam material that being the knowledge base for us.
We wait for new comments in this forum to improve the accuracy in the answer.
The question was asked wrong, because in addition to answers A and C being correct, B is also correct. So both AC and BC are correct, because in inheritance you can put a view pattern bigger than the parent class, you just can't put it smaller. Attention to the question because she didn't talk about independent changes so it can't be AB.
If the question falls on the test I would mark BC, I don't know if they score the most correct. To be on the safe side, I would mark BC.
upvoted 1 times
...
...
Log in to ExamTopics
Sign in:
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.
MPignaProTech
2 months, 3 weeks ago7df49fb
9 months, 4 weeks agoRAADEL3IMLAK
1 year, 11 months agoRAADEL3IMLAK
1 year, 11 months agoakbiyik
2 years, 1 month agocarloswork
2 years, 2 months agoiSnover
2 years, 3 months agoiSnover
2 years, 3 months ago