日期:2014-05-20 浏览次数:20775 次
String s = "D,266863,gde";//数据库中数据
String[][] smatch = {{"D","N"},{"266863","266864"},{"gdde","gded"}};//把各个属性的取值范围定义到二维数据中
String[] strArray = s.split(",");//拆分要匹配的数据属性
for (int i = 0; i < strArray.length; i++)
{
System.out.println(Arrays.asList(smatch[i]).contains(strArray[i]));
}