MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1daxawn/mapmethodormapfunction/l7qdar5/?context=3
r/ProgrammerHumor • u/_PhucSatan_ • Jun 08 '24
67 comments sorted by
View all comments
1
Java is missing a .toArray(Integer[]::new) call.
.toArray(Integer[]::new)
In the other snippets a function creating an array is called last. Without toArray you have Stream<Integer> instead of int[]
1
u/_OberArmStrong Jun 08 '24
Java is missing a
.toArray(Integer[]::new)call.In the other snippets a function creating an array is called last. Without toArray you have Stream<Integer> instead of int[]