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 the concept of proper inheritance?
Can we overload destructor in java?
How to sort array of 0 and 1 in java?
How to disable caching on back button of the browser?
What is the purpose of checked and unchecked exceptions in JAVA?
What is array size in java?
Explain the key functions of data binding?
Why stringbuilder is not thread safe?
Does java initialize arrays to zero?
What is the difference between instanceof and isinstance?
What is map java?
What is classes in java?
What is the purpose of using java.lang.class class?
Is string a data type in java?
What is the difference between reader/writer and inputstream/output stream?