Here you can discuss any problem related to the programming irrespective to the language..no matter it is java,.net,python,C,C++,C# etc......
Saturday, August 7, 2010
difference between abstraction and encapsulation
The difference between both are ,Abstraction and encapsulation are two separate concepts in Java. Abstraction is a technique that is used to represent common functionality amongst a set of classes. An analogy is to look at a set of vehicles: Car, Truck and Bus have some common features that all road vehicles share. From a Java perspective, the mechanics of turning four wheels, an engine, could be handled in abstract form through a common superclass. Abstraction allows subclasses to share common code without duplication.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment