What will be outcome of following code? List list = new ArrayList(); list.add(0, new Integer(42)); int total = list.get(0); System.out.println(total);
42
Compilation Error - Incompatible Type
Runtime Error - Java.lang.ClassCastException
None of above