adspace
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
How to sort array in descending order in java?
Write a program to print count of empty strings in java 8?
Is minecraft 1.15 out?
Write a program to find the whether a number is an Armstrong number or not?
What are the differences between heap and stack memory in java?
What is an object in java and how is it created?
What is the difference between equals() and == in java?
What is java string pool?
explain different ways of using thread? : Java thread
What is parsing in java?
Explain public static void main(string args[]) in java.
What is a classloader in java?
Differentiate between static and non-static methods in java.
Realized?
What do you mean by an interface in java?