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 FalseExplanation / 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
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.