List<String> test = new ArrayList<String>();
Here test is a list reference can only contain the Strings.
When what is the use of checking other types ( here 42 Integer) in test by using contains method?
why API written for contains method accepting the object of type 'Object'.
Can any one calrify me about this?