Computer Science, asked by Rockstarsaini2750, 1 year ago

Determine output of the following code.

interface A { } class C { } class D extends C { } class B extends D implements A { } public class Test extends Thread{ public static void main(String[] args){ B b = new B(); if (b instanceof A) System.out.println("b is an instance of A"); if (b instanceof C) System.out.println("b is an instance of C"); } }
A.Nothing.
B.b is an instance of A.
C.b is an instance of C.
D.b is an instance of A followed by b is an instance of C.

Answers

Answered by cutieeee10101
1
hey mate........the answer is

D.b is an instance of A followed by b is an instance of C.
Answered by Anonymous
0
<b><font size = "4">(^_-)(^_-)(^_-)(^_-)(^_-)(^_-)(^_-)(^_-)(^_-)
╭╼╾╼╾╼╾╼╾╼╾╼╾╼╾╮
┃ ┈┈ [_Hɪ Mᴀᴛᴇ_] ┈┈┈ ┃
╰╼╾╼╾╼╾╼╾╼╾╼╾╼╾╯

╔═══❁═❀═✪═❀═❁════╗
......Here You Go Ur Answer......
╚═══❁═❀═✪═❀═❁════╝

ıllıllıllıllıllıllı[ Your Answer ]ıllıllıllıllıllıllı

◆━━━━━◆♤◆━━━━━◆
☆Correct | ♤ | Option☆
◆━━━━━◆♤◆━━━━━◆

\huge\boxed{\texttt{\fcolorbox{aqua}{grey}{B}}} {\bf{\underline{Answer}}}

<marquee>

▂▃▅▇█▓▒░[ Hope It Helps You Dear ]░▒▓█▇▅▃▂
Similar questions