Originally posted by srikanth reddy:
so is it marc that we can remove blindly Map whenever they ask for collection.......
I don't know that I would say "blindly," because we can see exactly why this is. But if you mean "always" eliminate Map whenever a Collection is asked for, then I would say yes. Consider the following illustration...
Please select Number(s) that are Comparable.
a) Integer
b) Double
c)
String d) BigDecimal
e) BigInteger
All of these are Comparable. But a String is not a Number, just as a Map is not a Collection.