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 use of sublass in a java program?
Can we override the private methods?
What is the difference between stream and buffer?
How does hashset works in java?
What is the advantage of preparedstatement over statement?
What is use of inner class in java?
Is assembly language a low level language?
What are the wrapped, classes?
What do you mean by constructor?
How many bits is a boolean?
Is it possible to use Semaphore/ Mutex in an Interrupt Handler?
What is the difference between an object-oriented programming language and object-based programming language?
What is the purpose of using break in each case of switch statement?
What are green threads in java?
Why stringbuilder is not thread safe?