package org.geng.testPackage;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
publicclass AsListTest {
public static void main(String[] args) {
String testStr ="100,300,400,545,666";
//java.util.Arrays$ArrayList 沒有重寫add(), remove()方法所以用注釋掉的代碼會(huì)報(bào)錯(cuò)
//List test = Arrays.asList(testStr.split(","));
List test =new ArrayList();//所以需要這么重新new一個(gè)ArrayList
test.addAll(Arrays.asList(testStr.split(",")));
test.remove("100");
/*String s = "nu";
System.out.println(Arrays.asList(s));
*/
Integer[] payIds = {2,5,14,15};
if(Arrays.asList(payIds).contains(15)){
System.out.println("yes");
}else{
System.out.println("no");
}
}
}