Functional InterfacesJ8 Home « Functional Interfaces

We start this lesson by looking at encapsulation, its advantages and how to achieve it within our code. We then look at the design principles of coupling and cohesion and describe the benefits of loose coupling and high cohesion. We then explain polymorphism and how we use it in the Java language before looking at object reference casting and determine when casting will be necessary whilst recognizing compiler vs. runtime errors, related to it. After this we examine the effect of modifiers on inheritance with respect to constructors, instance or static variables, and instance or static methods. We then look at code that declares and/or invokes overridden or overloaded methods and code that declares and/or invokes superclass or overloaded constructors. We finish the lesson by investigating code that implements "is-a" and/or "has-a" relationships.

Lets take a look at the points outlined at Oracle Java SE 8 Programmer II for this part of the certification.

  • Lambda Built-in Functional Interfaces
    1. Use the built-in interfaces included in the java.util.function package such as Predicate, Consumer, Function, and Supplier.
    2. Develop code that uses primitive versions of functional interfaces.
    3. Develop code that uses binary versions of functional interfaces.
    4. Develop code that uses the UnaryOperator interfaces.

Related Java Tutorials

Objects & Classes - Reference Variables - The new Operator
Objects & Classes - Constructors
OO Concepts - Encapsulation
OO Concepts - Polymorphism
OO Concepts - Overriding Methods
Objects & Classes - Overloaded Methods
OO Concepts - Accessing Superclass Members
Inheritance Concepts - Superclass Constructors
OO Concepts - Static Overrides?
OO Concepts - IS-A and HAS-A Relationships