日期:2014-05-20 浏览次数:20791 次
public static void main(String[] args) { String a = "ff|dsf|sdfs|fsds|afdsf"; String b = "ff,dsf,sdfs,fsds,afdsf"; System.out.println(a.split("|").length); System.out.println(b.split(",").length); }