Showing posts with label List. Show all posts
Showing posts with label List. Show all posts

Tuesday, November 26, 2013

Published 11/26/2013 by with 0 comment

java.lang.UnsupportedOperationException at java.util.AbstractList.remove

When you create a java.util.List object from an array using Arrays.asList method and after that if you try to clear or remove the elements from the list you'll get this run time error. The reason is that Arrays.asList method returns a fixed-size list backed by the specified array. See in the example code below: int[] myArray = {5,10,15,20}; List intList = Arrays.asList(myArray); ...
Read More
    email this       edit