Show the output of running the class Test in the following code lines:

```
interface A {
}

class C {
}

class B extends D implements A {
}

public class Test {
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");
}
}

class D extends 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.


d. b is an instance of A followed by b is an instance of C.

Computer Science & Information Technology

You might also like to view...

The open source database management system used in LAMP development is ______.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

If an application contains only one method that executes, that method is called the ____________________ method.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Pinterest is like Facebook but with only ________

A) pictures B) music C) themes D) categories

Computer Science & Information Technology

Case WD 6-1Hilary has been assigned to put together a financial report that will be presented at the next sales meeting. Hilary changed the format of the table of contents, then a dialog box appeared asking if she wants to replace the current table of contents. Which button should she click?

A. No B. OK C. Format D. Replace All

Computer Science & Information Technology