V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Newyorkcity
V2EX  ›  问与答

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

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