Single Choice
Not Set
QWhich two classes use the Shape class correctly?
A. public class Circle implements Shape
{
private int radius;
}
B. public abstract class Circle extends Shape
{
private int radius;
}
C. public class Circle extends Shape
{
private int radius;
public void draw();
}
D. public abstract class Circle implements Shape
{
private int radius;
public void draw();
}
E. public class Circle extends Shape
{
private int radius;
public void draw()
{
/* code here */
}
}
F. public abstract class Circle implements Shape
{
private int radius;
public void draw()
{
/* code here */
}
}
ID: #2245
Inheritance in Java MCQ
9,209 views
Question Info
#2245Q ID
Not SetDifficulty
Inheritance in Java MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
If one is extending any class, then they should use extends keyword not implements.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic