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
PayPal · Java
Practice Java questions specifically asked in PayPal interviews – ideal for online test preparation, technical rounds and final HR discussions.
Questions
5
Tagged for this company + subject
Company
PayPal
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 PayPal 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.
Executors pool and reuse threads, reducing overhead and providing lifecycle control. Ordering and mutual exclusion are not guaranteed unless you choose specific executors or add your own coordination.
PriorityQueue is heap-based: head operations return the minimal (or maximal) element per comparator. Iteration does not guarantee sorted traversal.
CompletableFuture supports async pipelines (thenApply, thenCompose), timeouts, combining results, and completion actions without blocking. It works with default or custom executors.
NIO.2 exposes metadata via attribute views like BasicFileAttributes and PosixFileAttributes without reading file payloads, which is lightweight and efficient.