Newyorkcity
V2EX  ›  问与答

请问 JDK 的集合工具方法有没有快速把 int[] 转 List<Integer> 的❓

  •  
  •   Newyorkcity · Apr 19, 2020 · 1689 views
    This topic created in 2404 days ago, the information mentioned may be changed or developed.
    谢谢!
    3 replies  •  2020-04-19 17:09:41 +08:00
    Yuicon
    Yuicon
    Apr 19, 2020
    1
    这自己写写也就几分钟吧
    sheeta
    sheeta
    Apr 19, 2020 via Android
    2
    Arrays.asList() ?
    leighton
    leighton
    Apr 19, 2020❤️3
    3
    Arrays.stream(arr).boxed().collect(Collectors.toList())
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4312 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:10 · PVG 17:10 · LAX 01:10 · JFK 04:10
    ♥ Do have faith in what you're doing.