1. You catch ArithmeticException and Exception in that order. Which is correct?
Catch blocks are matched top-down. If a broader type comes first, narrower types are unreachable, causing a compile-time error.
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
Flipkart · Java
Practice Java questions specifically asked in Flipkart interviews – ideal for online test preparation, technical rounds and final HR discussions.
Questions
5
Tagged for this company + subject
Company
Flipkart
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 Flipkart Java round.
Catch blocks are matched top-down. If a broader type comes first, narrower types are unreachable, causing a compile-time error.
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.
HashMap grows when size > capacity × loadFactor (default 0.75). Resizing redistributes entries to a bigger table, keeping average O(1) operations.
Default `groupingBy(classifier)` uses a `HashMap<K, List<T>>`. Sorting or concurrent maps require additional downstream or mapFactory arguments.
WatchService lets you register a directory for change events. It’s best effort, may coalesce events, and is not a content diff tool or replication system.
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>.