Krishna Chaitanya Teralakcterala.hashnode.devยทJan 11, 2024Gotchas in JavaThese are some pitfalls that took me some time to unravel. I used to think .collect(Collectors.toList()) and .toList() are same and interchangeable. But first one creates a mutable list and second one creates a immutable list List<Integer>...JavaAdd a thoughtful commentNo comments yetBe the first to start the conversation.