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

Thanks A.jyotsna,
Can u tell me differnce between abstract class and interface

vikash

Answer Posted / rakesh kumar jha

Abstract class:-
1. if we declare ny class as a abstract, then we can't
create an object/instace of that class explicitly.
2.afbstracts class may or may not contain abstract method.
3. if on declare any method as an abstract, then the class
should be declared as abstract.
4.if a method is declared as abstract in abstract class,
then child bound to define the abstract method of parent.
5.abstract class may contain constructor.
6.abstract class may hold the child object.
Interface class:-
1.by default all method be abstract.
2.class can implements more than one interface class.
3.child should give the body of all method of interface
class, but if a child class with abstract keyword, then nod
need to give the body of interface classes method.
4.interface can't create objects but can hold the object of
child.
5. variable in interface class are by default public,
static and final.
6.we can't use the final, static, native,synchronous
keyword with the methods define in interface.
7. we can't declare interface as final.


if any question have, tell me at rkjhaw@sify.com or
info@shandilya.org

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about map interface in java?

998


What is bufferedwriter?

973


Can we have static methods in an interface?

1058


What is the similarity between dynamic binding and linking?

1122


Is alive and join method in java?

1179


Can there be an abstract method without an abstract class?

958


Where is singleton pattern used?

998


What will be the initial value of an object reference which is defined as an instance variable?

1151


What are the disadvantages of object oriented programming?

1281


What does the ‘static’ keyword mean? Is it possible to override private or static method in java?

989


Why enumeration is faster than iterator?

938


Explain reverse a linked list iterative solution in java?

928


Why is it called a string?

1013


what is a thread pool in java and why is it used?

1004


Explain the different forms of polymorphism?

1008