Friday, September 10, 2010

What will the use of Abstract class is preferred and where Interface will be preferred

Share This!


2 comments:

Unknown said...

When we are not much more cleared about the implementation the we go for Interface

For examples

Abstract class Vehicle ()
Vehicle can be Car , truck , motorbike any think

Interface VehicleParts()
In above interface we can have the common parts/feature of vehicle like wheel, size ,speed and all these may be different for different type of vehicle .


Thanks,
M4MAD

Unknown said...

When we are not much more cleared about the implementation the we go for Interface

For examples

Abstract class Vehicle ()
Vehicle can be Car , truck , motorbike any think

Interface VehicleParts()
In above interface we can have the common parts/feature of vehicle like wheel, size ,speed and all these may be different for different type of vehicle .


Thanks,
M4MAD

Powered By Blogger · Designed By Seo Blogger Templates