说明:
String str = "a,b,c,,";String[] ary = str.split(",");//预期大于3,结果是3System.out.println(ary.length);解决办法:说明:
String str = "a,b,c,,";String[] ary = str.split(",",10000);//预期大于3,结果是3System.out.println(ary.length);本文共 271 字,大约阅读时间需要 1 分钟。
说明:
String str = "a,b,c,,";String[] ary = str.split(",");//预期大于3,结果是3System.out.println(ary.length);解决办法:说明:
String str = "a,b,c,,";String[] ary = str.split(",",10000);//预期大于3,结果是3System.out.println(ary.length);转载于:https://www.cnblogs.com/xyd51cto/p/7832395.html