1Z0-829 • Practice Test 16
Free 1Z0-829 practice test — 15 questions with explanations. Set 16. No signup required.
A financial application processes transactions in batches. Each transaction is represented as a Transaction object with fields: long id, BigDecimal amount, LocalDateTime timestamp. Transactions are stored in a List<Transaction> in the order they arrive. The system needs to frequently check if a transaction with a specific id exists, and also needs to iterate through transactions in chronological order. The list currently contains millions of transactions, and the existence check is becoming a performance bottleneck because it currently uses a linear search. The system must also maintain insertion order for iteration. Which approach best improves the performance of the existence check while maintaining the required iteration order?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.