1. Is a try-finally block valid without a catch?
You can use try-finally to guarantee cleanup when you don’t need to handle the exception locally. The exception propagates after finally runs.
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
Adobe · Java
Practice Java questions specifically asked in Adobe interviews – ideal for online test preparation, technical rounds and final HR discussions.
Questions
9
Tagged for this company + subject
Company
Adobe
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 Adobe Java round.
You can use try-finally to guarantee cleanup when you don’t need to handle the exception locally. The exception propagates after finally runs.
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.
LinkedHashMap preserves a predictable iteration order: insertion order by default, or access order when configured for LRU-style caches.
Read-write locks allow many readers to proceed in parallel, blocking only when a writer acquires the write lock. This improves throughput in read-heavy workloads.
PriorityQueue is heap-based: head operations return the minimal (or maximal) element per comparator. Iteration does not guarantee sorted traversal.
Generational hypothesis: new objects tend to be short-lived. Minor collections reclaim them quickly, while the old generation is collected less often.
Mapping, filtering, sorting build the pipeline; collect, reduce, forEach consume it. `peek` is intermediate and `allMatch` is terminal.
Primitive streams save allocations and add numeric terminals (sum, average, min, max). They convert via mapToInt, mapToLong, mapToDouble and boxed().
Platform defaults vary and can break portability. Always specify the charset explicitly when converting bytes to characters to avoid mojibake and subtle data loss.
try-with-resources auto-closes resources that implement AutoCloseable (or Closeable which extends it). This ensures deterministic cleanup even when exceptions occur.