import java.util.*; public class TypeUnsafe { public static void main(String[] args) { List numbers = new ArrayList(); numbers.add("1"); numbers.add(2); numbers.add("3"); int total = 0; for(int i = 0; i < numbers.size(); i++) { total += Integer.parseInt((String) numbers.get(i)); } System.out.println("total = " + total); } }