SHARE
TWEET

Arrays.asList is a wrapper, not a copy

a guest Sep 2nd, 2011 59 Never
  1. int[] a = { 1, 2, 3 };
  2. Iterator<int[]> iterator = Arrays.asList(a).iterator();
  3. iterator.next();
  4. iterator.remove(); // throws UnsupportedOperationException
RAW Paste Data
Top