class Al void methodA(){ } void methodB(); } class B extends A{ void methodA(){ } } O class A should be abstract methodB should be abstract O both a and b both classes are okay

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 3RQ
icon
Related questions
Question
Given:
abstract class A{
{ }
A() { }
static int a;
void methodA(){ }
}
cannot have anonymous instance initializer block
cannot have a constructor
cannot have static variables
O everything is okay
Transcribed Image Text:Given: abstract class A{ { } A() { } static int a; void methodA(){ } } cannot have anonymous instance initializer block cannot have a constructor cannot have static variables O everything is okay
class A{
void methodA(){}
void methodB();
}
class B extends A{
void methodA(){ }
}
class A should be abstract
methodB should be abstract
both a and b
both classes are okay
Transcribed Image Text:class A{ void methodA(){} void methodB(); } class B extends A{ void methodA(){ } } class A should be abstract methodB should be abstract both a and b both classes are okay
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,