This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
saloni jhanwar wrote:i understand here that (1) anything (2) Object or it's super class
No. The second argument means anything which extends Object - i.e. Object, or its subclass.
saloni jhanwar wrote:So in <? extends Dog> ,Dog cab be a class or an interface.
Yes, but it is reference type, right? I mean, when you pass a parameter to a method, you may pass a reference type of Dog, but it also would be referring to a concrete object (i.e. the class name which you used after 'new' keyword). And since that is an actual object (of a concrete class), that class would be implicitly sub-class of Object, right?