Sunday, June 17, 2012

what's the difference between abstract and concrete class?


Concrete class - Provides implementation for all its methods & also for methods from extended abstract classes or implemented interfaces
Abstract class - Does not provide implementation for one or more of its methods
Interface - Does not provide implementation for any of its methods

Read more: http://wiki.answers.com/Q/Difference_between_concrete_class_and_abstract_class_and_interface#ixzz1y2HulwzD


The default class is a concrete class. The class keyword is used to define classes (e.g. in Java).
And usually they are simply referred to as classes (without the adjective concrete). (adjective concrete).
Abstract classes usually have partial or no implementation. On the other hand, concrete classes always have full implementation of its behavior.
Unlike concrete classes, abstract classes cannot be instantiated.
Therefore abstract classes have to be extended in order to make them useful.
Abstract classes may contain abstract methods, but concrete classes can’t.
When an abstract class is extended, all methods (both abstract and concrete) are inherited.
The inherited class can implement any or all the methods.
If all the abstract methods are not implemented, then that class also becomes an abstract class.

Read more: http://www.differencebetween.com/difference-between-abstract-class-and-vs-concrete-class/#ixzz1y2IGPCHk

Java Programming Tutorial - 58 - Abstract and Concrete Classes
http://www.youtube.com/watch?v=TyPNvt6Zg8c


No comments:

Post a Comment