Does a class have to implement a interface directly
Quick question. Does a class have to implement a interface directly to be accepted, or can it be a child of a parent class that im开发者_高级运维plements it.
so If I pass a child object into a method that only accepts IOBJECT, but the child class parent implements IOBJECT. will child object be accepted ?
If the parent satisfies IS-A for an interface type the child does as well. The child need not implement the interface.
精彩评论