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

I have a class which is abstract which contains only the
abstract methods. This is similar to an interface. Then, if
i have given a choice to choose one of them. Which one i
have to choose and why?

Answer Posted / madhav

Interface is preferable to Abstract class as when ever in
instance is created for subclasses of this,constructors
will be called hirarchially consuming some time for each
constructor call..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is module with example?

1013


Is arraylist a class in java?

1068


What is the size of int in 64-bit jvm?

1099


What is locale?

1036


How many types of methods are there in java?

1009


Give an example of call be reference significance.

1032


Explain the difference between abstract class and interface in java?

983


Can we create object of inner class in java?

946


What is the difference between synchronized and synchronized block?

1067


Why can we not override static method?

1106


Why is a string immutable?

1012


Define interface in java?

1082


What happens if an exception is throws from an object's destructor?

1048


What is a method in coding?

1058


What is final keyword in java?

1021