I am trying to run the following code:
List<Integer> list = Arrays.asList(1,2,3);
ArrayList<Integer> val = new ArrayList<Integer>(list);
i know that i get the list in the first line but I ran it out of curiosity. To my disbelief, val list is empty after running of the above code, at least on my Eclipse Indigo, java 1.6 machine. Any ideas?
The following code:
works fine for me (it outputs
3). Your problem must lie elsewhere.