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


Please Help Members By Posting Answers For Below Questions

Explain importance of throws keyword in java?

560


How many types of flags are there?

519


What is jvm? How its run?

657


What is not thread safe?

493


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

613






What do you mean by thread safe?

537


Are arrays primitive data types?

634


Can a boolean be null java?

537


What is rule of accessibility in java?

540


What is final modifier?

556


What does replaceall do in java?

484


What is a layout manager and what are different types of layout managers available in java awt?

718


What are different types of references?

526


explain autoboxing in java?

593


How do you get the length of a string in java?

518