日期:2014-05-19 浏览次数:20843 次
String xx = "a-b-c"; String[] testStrings = xx.split("-"); System.out.println(testStrings[0]); if(testStrings[0].toString() == "a"){ System.out.println("00000"); }else if(testStrings[0].equals("a")){ System.out.println("ssssss"); } else{ System.out.println("11111"); }