(ACE FOR 2024/2025 EXAM REVIEW) Java 8 OCP WGU C195. Exam Questions and answers, 100% Accurate. Rated A+
Java 8 OCP WGU C195. Exam Questions and answers, 100% Accurate. Rated A+ collect() - -A terminal operation method. A special type of reduction called a mutable reduction What 3 parameters are passed to the collect() method? - -supplier, accumulator, combiner filter() - -An intermediate operation method. Returns a Stream with elements that match a given expression. distinct() - -An intermediate operation method. Returns a stream with duplicate values removed. limit() and skip() - -An intermediate operation method. They can make a finite stream smaller, or make a finite stream out of an infinite stream. map() - -An intermediate operation method. Creates a one-to-one mapping from the elements in the stream to the elements of the next step in the stream. flatMap() - -An intermediate operation method. Takes each element in the stream and makes any element it contains top-level elements in a single stream. sorted() - -An intermediate operation method. Returns a stream with the elements sorted. Uses natural ordering unless specified with a comparator. Supplier - -Method Signature: T get() Supplier - -Example Lambda: () - new String("Hello ladies!') Consumer - -Method Signature: void accept(T t
Written for
- Institution
- Western Governors University
- Course
- WGU C195
Document information
- Uploaded on
- November 2, 2023
- Number of pages
- 6
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
java 8 ocp wgu c195 exam questions and answers