kri shan wrote:List<Object> list = new ArrayList<Object>();
list.add(sel);
list .add("adsf");
Is it correct?
It's correct, but when you retrieve some thing from this ArrayList, there may be ClassCastException, because, you stored different objects!
kri shan wrote:
Java5 autoboxing/unboxing feature avoids specific casting for each type.
What do you mean?