Which two interfaces are considered to be functional interfaces? (Choose two.)
A.
@FunctionalInterface interface InterfaceC { public boolean equals(Object o); int breed(int x); int calculate(int x, int y); }
B.
@FunctionalInterface interface InterfaceD { int breed(int x); }
C.
@FunctionalInterface interface InterfaceE { public boolean equals(int i); int breed(int x); }
D.
interface InterfaceA { int GERM = 13; public default int getGERM() { return GERM; } }
E.
interface InterfaceB { int GERM = 13; public default int getGERM() { return get(); } private int get() { return GERM; } public boolean equals(Object o); int breed(int x); }
E will not pass as a functional interface since breed(int) is implicitly abstract and public. D can pass as a Functional Interface even if it does not have a single abstract method. B and D are correct.
ANSWERS IS B AND E:
B: Has a only one SAM (single abstract method)
and
E: has a single abstract method, cause default and private methods are not considered abrascts, and EQUALS is a method from OBJECT neither tecnically considered abstract
C: is a triky cause boolean equals(Objetct obj) must be the method from objetc that no count of SAM, every other implementation is count. boolean equals(Integer i); is count Fexmple
This section is not available anymore. Please use the main Exam Page.1z0-819 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.
19980829
3 months, 4 weeks agorey_911
7 months, 3 weeks agoc47d39c
9 months agod7bb0b2
1 year, 4 months agod7bb0b2
1 year, 3 months agotmuralimanohar
1 year, 9 months agoStavok
1 year, 10 months agoRP384
2 years, 2 months agoAnkit1010
2 years, 2 months ago