Hi
jinesh
To iterate the elements in the List,Map....
class Animal
{
}
class Dog extends Animal
{
}
class cat extends Animal
{
}
some method like this
public void display(List<Animal>l)
{
}
If you want to iterate ,then
you should or you must send a List of type Animal means List<Animal>
We can send any other thing like List<Dog>,List<Cat>.
If you define a method say List<? extends Animal>.
Menas we can send List<dog>,because Dog is-A Animal.
We can even send List<Cat> ,because Cat is- A Animal
Thanks
Anil Kumar
[ June 13, 2007: Message edited by: anil kumar ]