llq1214

数组初始化 时候的赋值

 

String[] strings = new String[]{
              "one","two","three"
        };

  

 

list 初始化时候的赋值

 

List<String> a = new ArrayList<String>() {//这个大括号 就相当于我们  new 接口
				{//这个大括号 就是 构造代码块 会在构造函数前 调用
					this.add("ZBP3100019");	
					this.add("ZBP3100019");
					this.add("ZBP3100019");	
					this.add("ZBP3100019");
					this.add("ZBP3100019");	
					this.add("ZBP3100019");
					this.add("ZBP3100019");	
					this.add("ZBP3100019");
				}
			};

  

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2021-10-19
  • 2021-10-07
猜你喜欢
  • 2021-12-05
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案