List<String> list = new ArrayList<String>(){{
  add("First Object");
  add("Second Object");
  add("Third Object");
}};

Map<String, String> map = new HashMap<String, String>(){{
  put("First Key", "First Value");
  put("Second Key", "Second Value");
  put("Third Key", "Third Value");
  put("Fourth Key", "Fourth Value");
}};

 

相关文章:

  • 2021-12-20
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2021-05-23
  • 2022-03-09
  • 2022-12-23
猜你喜欢
  • 2021-08-08
  • 2022-12-23
  • 2022-02-20
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案