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
What is meant by anonymous class?
What happens to the Exception object after handling an exception?
What happens if we override private method?
What is vector?
What do you mean by formatting?
What is a variable and constant?
What is anti pattern in programming?
Explain about join() method?
What is the purpose of void class?
Explain about wait() method?
Is 0 a prime number?
How would you convert bytes to string?
Does substring start with 0?
Why singleton class is used in java?
What do you mean by data type?