class="java" name="code">
public static void main(String[] args) {
String[] field = {"rh","pr1","wd","ws","t","p"};
List<String> fieldList =Arrays.asList(field);
fieldList.remove("pr1");
}
用数组转的List 调用remove 方法会报错,应该数组转List 并不是完全转化
Exception in thread "main" java.lang.UnsupportedOperationException
at java.util.AbstractList.remove(Unknown Source)
at java.util.AbstractList$Itr.remove(Unknown Source)
at java.util.AbstractCollection.remove(Unknown Source)
at com.kedalo.base_service.comm.RestfulApiRecord.main(RestfulApiRecord.java:264)