public static void main(String[] args) {
// TODO Auto-generated method stub
String str1 = "a,b,c,,,a";
String str2 = "a,b,c,,,";
String str3 = "a,b,c, , ,";
String[] s1 = str1.split(",");
String[] s2 = str2.split(",");
String[] s3 = str3.split(",");
System.out.println("str1长度:"+s1.length);
System.out.println("str2长度:"+s2.length);
System.out.println("str3长度:"+s3.length);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
String str1 = "a,b,c,,,a";
String str2 = "a,b,c,,,";
String str3 = "a,b,c, , ,";
String[] s1 = str1.split(",");
String[] s2 = str2.split(",",-1);
String[] s3 = str3.split(",",-1);
System.out.println("str1长度:"+s1.length);
System.out.println("str2长度:"+s2.length);
System.out.println("str3长度:"+s3.length);
}
: { "boo", "and", "foo" }
o { "b", "", ":and:f" }
: 2 { "boo", "and:foo" }
: 5 { "boo", "and", "foo" }
: -2 { "boo", "and", "foo" }
o 5 { "b", "", ":and:f", "", "" }
o -2 { "b", "", ":and:f", "", "" }
o 0 { "b", "", ":and:f" }
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有