1. What does Collectors.groupingBy do by default?
Default `groupingBy(classifier)` uses a `HashMap<K, List<T>>`. Sorting or concurrent maps require additional downstream or mapFactory arguments.
Get the Preplance app for a seamless learning experience. Practice offline, get daily streaks, and stay ahead with real-time interview updates.
Get it on
Google Play
4.9/5 Rating on Store
LinkedIn · Java
Practice Java questions specifically asked in LinkedIn interviews – ideal for online test preparation, technical rounds and final HR discussions.
Questions
2
Tagged for this company + subject
Company
View company-wise questions
Subject
Java
Explore topic-wise practice
Go through each question and its explanation. Use this page for targeted revision just before your LinkedIn Java round.
Default `groupingBy(classifier)` uses a `HashMap<K, List<T>>`. Sorting or concurrent maps require additional downstream or mapFactory arguments.
For complete preparation, combine this company + subject page with full company-wise practice and subject-wise practice. You can also explore other companies and topics from the links below.
thenApply maps a result; thenCompose chains async stages avoiding nested futures. thenRun ignores the value; handle observes both result and exception. allOf returns a CompletableFuture<Void>.