subject

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.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:00, Paulalex8765
Select all that apply. what types of documents can be created using word-processing software? business newsletters letters of application presentation slideshows customer databases
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, Jana1517
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i. e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
image
Computers and Technology, 23.06.2019 15:10, cathyjuan
What role did women fill during world war ii?
Answers: 1
image
Computers and Technology, 23.06.2019 22:50, christingle2004
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
You know the right answer?
Show the output of running the class test in the following code lines:
interface a { }
...

Questions in other subjects:

Konu
Computers and Technology, 09.12.2020 17:20
Konu
Chemistry, 09.12.2020 17:20