Answer is B.
class P1{}
class P2 extends P1 implements I1 {}
interface I1{}
public class Test {
public static void main(String[] args) {
P1 obj = new P1();
P2 obj2 = new P2();
I1 obj3 = new P2();
boolean r1 = obj instanceof P2;
boolean r2 = obj2 instanceof P1;
boolean r3 = obj3 instanceof I1;
System.out.println(r1 + ":" + r2 + ":" + r3);
}
}
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.1z0-808 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.
tawa_z58
1 year agocarloswork
2 years, 2 months ago