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

How can we pass argument to a function by reference instead of pass by value?

1044


What is annotation in java?

995


Can java cast null?

977


What is the difference between stringbuffer and stringbuilder?

982


How do you check whether the list is empty or not in java?

920


What is lexicographically smallest string?

1015


What is a protected void?

877


Which class is the superclass of all classes?

1052


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

970


Can you sort a string in java?

855


Explain the scope of a variable.

1023


What is the same as procedures?

929


What is meant by collection in java?

1006


What is the purpose of void?

949


What is the difference between abstract classes and interfaces?

972