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

when to use abstract class and when to use interface?

Answer Posted / mohit jethva

In Interfate you are restricting a user to impement each
and every method of interface so if you have a requirement
which is constantly changing so don't prefere interface.

While in Abstract Class user don't need to implement each
and every method which is not required or marked with
mustoverride.


And by using interface you can achive multiple inheritance
in C# but with Abstact class it's can't be achive

Is This Answer Correct ?    31 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the primary benefit of encapsulation?

1090


What is run time allocation?

1028


What java ide should I use?

998


What is outofmemoryerror in java?

1031


What are triggers in DB? Explain their types. How do they work?

1092


What is treemap in java?

950


What is the difference between checked exception and unchecked exception?

1017


Can we assign the reference to this variable?

980


What are the data types supported by java?

1029


which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com

3670


What is the static import?

1107


What is meant by nested loop?

1038


What is a map in java?

995


What is difference between public static and void?

1021


What is the return type of the main method?

1044