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

what is the difference between abstract class and
Interface?where we can use it in realtime projects?

Answer Posted / abilash

1)If we r having 2 classes, both classes need a method with
same business logic(definition). Then we can go for an
abstract class. In this abstract class we can define the
method with functionality. And the two classes will extend
this abstract class.
2)In other case if two different classes wants two different
functionalities with same method name , then we go for an
interface with abstract declaration of method.And the two
classes will implement the interface and override the method
with different business logic

Is This Answer Correct ?    31 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is javac used for?

894


Explain about object oriented programming and its features?

974


What are the methods used to implement for the key object in the hash map?

992


Can we assign null to double in java?

966


Describe method overriding

1076


Explain the meaning of java applet.

1027


What is the size of arraylist in java?

991


What is visibility mode?

907


Is an array a vector?

975


Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..

2247


What one should take care of, while serializing the object?

860


What is the scope or life time of instance variables?

1063


What is a module function?

1032


What are the advantages of functions?

873


How many static init can you have?

1152