Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

ID: 3798804 • Letter: T

Question

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

Given the following declarations: abstract class A {int x; A() {x = 10;} void print(double a) {System.out.println("Hi a is, " + a);} void print(){}} class B extends A {void print() {System.out.println("Does this even works?"): super print(25.5);}} Select responses that would best describe these classes. Select one or more: class B is a concrete class class B is an abstract class class B must be declared with the keyword abstract, or class B must define both methods it inherited for it not to be an abstract class Both classes compile fine The keyword super should be first executable statement in the method The statement A a = new A() will not compile. Given the following class definitions. class A {} class B extends A {} The following statement will compile B b = new A(); Select one. True False

Explanation / Answer

1.

class B must be declared with the keyword abstract or class B
must define both methods it inherited for it not to be an abstract class.

2.

True

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote