Friday, January 11, 2013

Interfaces

Sometimes you have a group of classes that are not necessarily related through an inheritance-type relationship.You may have totally different class that just happen to share some behaviors in common.For example,both a jar and a door can be opened and closed ,however,they are in no other way related .No matter the kind of jar or the kind of door,they both can carry out these activities ,but there is no other common thread between them.

No comments:

Post a Comment