I want to remove specific elements from my List. I don't want to do this while iterating through the list. I want to specify the value which has to be deleted. In javadocs I found the function List.remove(Object 0) This is my code :
String str="1,2,3,4,5,6,7,8,9,10";
String[] stra=str.split(",");
List<String> a=Arrays.asList(stra);
a.remove("2");
a.remove("3");
But I get an Exception : java.lang.UnsupportedOperationException