I want to decare two Lists: First is a list of Integers. I decare it as:
List ints= Arrays.asList(1,2,3);
It works fine.
Use this works perfect
List extends Object> objs = Arrays.asList(10,20.32,"test"); System.out.println(objs);
Output: [10, 20.32, test]