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
         
    }
}

 split拆分数组长度问题

相关文章:

  • 2021-11-21
  • 2022-12-23
  • 2021-05-30
  • 2021-12-09
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2021-12-20
  • 2021-06-19
  • 2022-03-04
  • 2021-06-03
  • 2021-11-04
  • 2022-01-25
相关资源
相似解决方案