Given: interface B B){} {} void methodA(); cannot have a constructor cannot have an instance initializer methodA must have a body O both a and b

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question
Given:
interface B
{
B () { }
{ }
void methodA();
}
cannot have a constructor
cannot have an instance initializer
methodA must have a body
both a and b
Transcribed Image Text:Given: interface B { B () { } { } void methodA(); } cannot have a constructor cannot have an instance initializer methodA must have a body both a and b
Given:
interface B
void methodA();
class C implements B
{
void methodB(){ }
}
everything is fine
methodA should be overriden in class C
O class C should be abstract
O either b or c
Transcribed Image Text:Given: interface B void methodA(); class C implements B { void methodB(){ } } everything is fine methodA should be overriden in class C O class C should be abstract O either b or c
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Introduction to Interface
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,