Posts

Showing posts with the label abstract classes

ABSTRACTION

Data Abstraction is the property by virtue of which only the essential details are displayed to the user. abstraction is achieved by interfaces and abstract classes . Interfaces --- it does not have any defined methods so we can not make objects of interface. Classes implements interfaces   example -- public interface car { public boolean ispetrolcar(); public boolean enginetype(); } class automobile implements car{ ispetrolcar(){ return true} enginetype(){ return petrol;} }