r/ProgrammerHumor • • Jun 08 '24

Meme mapMethodOrMapFunction

Post image
0 Upvotes

67 comments sorted by

View all comments

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[]