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...

how you will prevent inheritance is there any other way
other than inheritance?

Answer Posted / raju

One way to prevent inhertance is final class
2) Using private Constructor in a class we can prevent
inhertance[Single ton class ]
Alternate of in hertance are
delegation,composition, aggrigration etc..

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between fileinputstream and filereader in java?

1114


Does substring create a new object?

1053


What is difference between arraylist and list in java?

1133


What are the types of literals?

1270


How do you sort in descending order in java using collections sort?

970


what are the disadvantages of indexes in oracle?

2637


What are the restrictions imposed by a Security Manager on Applets?.

2650


Is arraylist ordered?

1126


Say any two properties in beans?

1111


How do you square a number in java?

1106


Can a class have multiple constructors?

1137


Name and explain the types of ways which are used to pass arguments in any function in java.

1128


List down the methods and interfaces of collection class in java.

1036


Which method returns the length of a string?

1095


Mention the default values of all the elements of an array defined as an instance variable.

1038