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 we will use an Interface and Abstract class?

Answer Posted / manoshp

Abstract class:- When there are common behaviors for a set of classes and that behavior do not have any existence by its own, these behaviors are defined in an abstract super class. All sub classes will inherit that common behavior by extending the super class.

Interface:- When there are multiple implementations for a set of functionalities, all these behaviors are defined in an interface as entry points without any implementation details to these behaviors. The client class can use this interface without considering the implementation details.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is output buffer?

980


What are streams?

1059


What is the difference in between cpp and java? Can u explain in detail?

1029


How to use arraylist in java netbeans?

976


Can a private method be declared as static?

969


What is flush () in java?

958


Is string is a class in java?

895


How many digits is int32?

930


Is java 11 paid version?

920


how would you implement a thread pool? : Java thread

847


Explain JMS in detail.

974


What is static and final keyword in java?

982


Explain when noclassdeffounderror will be raised ?

990


What are selection structures?

939


Explain jdk, jre and jvm?

915