Arrays.asList 列表使用
Arrays.asList 列表使用
public final static String [] CAR_TYPE={"30","35"}; List carLists = Arrays.asList(CAR_TYPE) String carType = "20"; if(carLists.contain(carType)){ System.out.println("exists") }else{ System.out.println("not exists") }