Given: interface Doable { public void doSomething (String s); } Which two class definitions compile? (Choose two.)
A.
public class Task implements Doable { public void doSomethingElse(String s) { } }
B.
public abstract class Work implements Doable { public abstract void doSomething(String s) { } public void doYourThing(Boolean b) { } }
C.
public abstract class Job implements Doable { public void doSomething(Integer i) { } }
D.
public class Action implements Doable { public void doSomething(Integer i) { } public String doThis(Integer j) { } }
E.
public class Do implements Doable { public void doSomething(Integer i) { } public void doSomething(String s) { } public void doThat (String s) { } }
Answer is CE,
Option A implements doSomethingElse(String s) instead doSomething(String s).
Option C abstract method allowed not to implement functions methods
Answer C and E. A doesn't compile since method name is doSomethingElse and not doSomething. B isn't ok since doSomething is defined as abstract but provides implementation.
This section is not available anymore. Please use the main Exam Page.1z0-809 Exam Questions
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.
varconite
Highly Voted 3 years, 12 months agovarconite
3 years, 12 months agoshivkumarx
Most Recent 8 months, 1 week agoasdfjhfgjuaDCV
9 months agosteefaand
10 months agoMahdiHamdii
1 year, 11 months agoWilsonKKerll
2 years, 8 months agoMudzingwa
2 years, 11 months agoSamriddji
3 years agoSvetleto13
3 years, 7 months agoSamps
4 years, 3 months agoadnano1234
4 years, 10 months ago