class a extends b
{
}
class b extends a
{
}
why java doesn't support cyclic pls explain me with example
Answer Posted / lakshminarayana
IN THE FIRST BLOCK CLASS IS EXTENDING CLASS B.HERE A IS SUB
CLASS OF CLASS B.
AGAIN CLASS B IS EXTENDING CLASS A WHICH IS A SUB CLASS OF
B.A SUB CLASS NEVER BECOME A SUPER CLASS FROM WHICH IT IS
EXTENDED. SO IN JAVA IT THROWS A EXCEPTIONS LIKE CYCLIC
INHERITANCE NOT POSSIBLE...
... I THINK IT WILL HELPFUL FOR U.
Is This Answer Correct ? | 30 Yes | 2 No |
Post New Answer View All Answers
Explain importance of throws keyword in java?
How many types of flags are there?
What is jvm? How its run?
What is not thread safe?
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
What do you mean by thread safe?
Are arrays primitive data types?
Can a boolean be null java?
What is rule of accessibility in java?
What is final modifier?
What does replaceall do in java?
What is a layout manager and what are different types of layout managers available in java awt?
What are different types of references?
explain autoboxing in java?
How do you get the length of a string in java?