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

In real time project when will we use Abstract class. and
what are the difference between abstract and interface.

Answer Posted / naveen verma

Abstract Class:- its should have declared as abstract and must contain atleast one abstract method. an abstract class can be extended from either an abstract class or the class which is extending the abstract class should implement all methods of abstract method.

Interface:- In interface the methods are only declared not define the class which implementing the interface can define the method body as per its need. its not mendatory to define every method of the interface.


In really time application we extend abstract class only we when we need to modify the class. where as interface can be used to implements its method.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How substring() method of string class create memory leaks?

1094


Define aop(assepct oriented programing)?

1248


What are callback interfaces?

1135


How to deploy Jar, War files in J2EE?

2732


What is clustering? What are the different algorithms used for clustering?

1124


Where can I find seam examples and documentation?

1148


Where can I ask questions and make suggestions about seam?

1112


Can constructors be synchronized in java?

1174


Can I use javascript to submit a form?

1198


What is a modular application? What does module-relative mean?

1119


Explain what is synchronization?

1147


Is jvm a overhead?

1162


What is the map interface?

1172


What is JTS?

2431


What is synchronization and why is it important?

1186