Skip to content

Latest commit

 

History

History

chapter_4

Chapter 4: Functional Programming

📜 Contents 📜


🎯 Exam Objectives 🎯

This chapter will introduce more functional interfaces and the Optional class.

  • Generics and Collections:

    • Collections Steams and Filters
    • Iterate using forEach methods on Streams and List
    • Describe Stream interface and Stream pipeline
    • Use method references with Streams
  • Lambda Built-In Functional Interfaces

    • Use the built-in interfaces in java.util.function such as Predicate, Consumer, Function and Supplier
    • Develop code which uses primitive versions of functional interfaces
    • Develop code which uses binary version of functional interfaces.
    • Develop code that uses the UnaryOperator interface
  • Java Stream API:

    • Develop code to extract data from an object using peek() and map() methods including the primitive versions of map()
    • Search for data by using search methods in Streams such as findFirst, findAny, anyMatch, allMatch, and noneMatch
    • Develop code which uses the Optional class
    • Develop code which uses Stream data and calculation methods
    • Sort a collection using Stream API
    • Save results to a collection using the collect method
    • Use merge() and flat() methods of Stream API