Choose the correct option based on this code segment:.
class Rectangle { } class ColoredRectangle extends Rectangle { } class RoundedRectangle extends Rectangle { } class ColoredRoundedRectangle extends ColoredRectangle, RoundedRectangle { }
Choose an appropriate option:.
MultipleClassInheritanceException
EmptyClassDefinitionError
A.
Java does not support multiple class inheritance.
Since ColoredRectangle
and RoundedRectangle
are classes, it results in a compiler error when ColoredRoundedRectangle
class attempts to extend these two classes.
It is acceptable for a class to be empty.