Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 the concept of proper inheritance?

1062


Can we overload destructor in java?

982


How to sort array of 0 and 1 in java?

938


How to disable caching on back button of the browser?

1070


What is the purpose of checked and unchecked exceptions in JAVA?

997


What is array size in java?

952


Explain the key functions of data binding?

1009


Why stringbuilder is not thread safe?

1015


Does java initialize arrays to zero?

1025


What is the difference between instanceof and isinstance?

1047


What is map java?

965


What is classes in java?

934


What is the purpose of using java.lang.class class?

1002


Is string a data type in java?

1013


What is the difference between reader/writer and inputstream/output stream?

1068