IT虾米网

split拆分数组长度问题

mate10pro 2018年05月30日 编程语言 1285 0
package test; 
 
public class test1_format { 
 
    public static void main(String[] args) { 
         System.out.println("1&".split("&").length);//长度为1 
         System.out.println("1&1".split("&").length);//长度为2 
         System.out.println("1&&&".split("&").length);//长度为1 
         System.out.println("&1".split("&").length);//长度为2 
          
    } 
}

 

评论关闭
IT虾米网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

java 自带md5加密