This is java COP 3337 Please just give me the correct answer

This is java (COP 3337) Please just give me the correct answer, no explanation, thumbs up waiting :)

Consider the following Java program. class A {void print() {System.out.println(\"a is not n an instance of B\"):}} class B exceeds A {void print() {System.out.println(\"b is an instance of A\"):}} class AB {public void display () {A a = new A() B b = new B() If (!(n instance of B)) a.print(); If (b instance of A) b.print(); a = b; b.print();}} Which of the following sets of statements is the correct output generated from the program? a is not an instance of B b is an instance of A b is an instance of A a is not an instance of B b is an instance of A a is not an instance of B b is an instance of B b is an instance of A a is not an instance of A b is an instance of A b is an instance of B The program does not compile. Select one: III V IV II I Where should the following Java statement be located in a Java program? Be precise. super(\"Hi there, hello\". 25); Select one: It should come before the this() statement in the constructor. It should be the first executable statement in the constructor. it should be the last executable statement in the constructor. It can be anywhere, as long as it is in the constructor.

Solution

1)Ans) e

a is not an instanc eof B
b an instanc eof A
b an instanc eof A

________________

2)Ans) b --- It should be the first executable statement inside the constructor

________________Thank You

This is java (COP 3337) Please just give me the correct answer, no explanation, thumbs up waiting :) Consider the following Java program. class A {void print()

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site