what is the difference between these two? in the first case why it allows int value in ArrayList?
ArrayList al = new ArrayList<String>();
al.add(1);
al.add(2);
System.out.println(al.get(1));