answer: A
B Failed
default method y() is a public
so it can not has a weaker access privileges with the inheritance
---------
CDE
FAILED
interface method x() is a public
it can not has a weaker access privileges with the inheritance
A =>is correct ,
B=> Cannot user super.y() to call interface method , this is only used to call superclass methods not interface method, so if you call default method of interface directly use y();
C=> void x() is less restrictive that method in interface, the interface methhos is marked as public abstract.
D=> SAME REASON B + C
E=> SAMME REASON C
That is correct, interface by default is marked as public abstract , so implement acces less restrictive not compile.
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.
ASPushkin
7 months, 2 weeks agoOmnisumem
8 months agomendjijet
12 months agod7bb0b2
1 year agoStavok
1 year, 6 months agoJtic
1 year, 11 months agoJtic
1 year, 11 months ago[Removed]
1 year, 5 months agod7bb0b2
1 year ago