1Z0-829 Working with Streams and Lambda Expressions • 20 Questions
20 1Z0-829 Working with Streams and Lambda Expressions practice questions with answers and explanations. Free, no signup.
A company processes financial transactions. Each transaction is represented by a Transaction object with fields: amount (double), currency (String), and type (String). The requirement is to compute the total amount of all transactions of type 'SALE' in USD. The transactions are stored in a List<Transaction>. Which code correctly accomplishes this using streams?