Introduction Functional interfaces are the basics of functional programming in Java 8. If you master the six basic interfaces, you can derive the rest and understand the streams. In this section, we will cover the common functional interfaces in java.util.function package: Supplier, Consumer, Predicate, Function, UnaryOperator, and BinaryOperator. Class Hierarchy The diagram shows the class
Introduction The collection interfaces are divided into two groups: the most basic interface java.util.Collection, and other collection interfaces based on java.util.Map. In this section, we will cover four main interfaces in the Java Collections Framework: List, Set, Map, and Queue. List You usually use a list when you want an ordered collection that can contain duplicate entries. All
Introduction Generics enable types (classes and interfaces) to be parameters when defining classes, interfaces, and methods. It enables you to re-use the same code. In this section, we will cover Generic Classes, Generic Interfaces, Generic Methods, and Bounded Type Parameters. Type Parameter Naming Conventions By convention, type parameter names are single, uppercase letters. The most
Introduction This section covers the OCP Java SE 8 Programmer II exam objectives: design an interface, define functional interfaces, implement polymorphism, create and use singleton classes and immutable classes. Designing an Interface Let’s revise the interface rules in Java 8. An interface may extend another interface, and in doing so it inherits all of the
Introduction This section holds the summary of the first chapter of OCP Java SE 8 Programmer II Study Guide. The OCP exam topics covered are how to use instanceof, implement equals/hashCode/toString, create enumerations, and create nested classes. Virtual methods Virtual functions are an important part of the run-time polymorphism in object-oriented programming. They are just
I assembled the notes that I took while studying Java SE 8 Programmer I exam. I hope you will find it useful. You can download it here Notes on OCA Java SE 8 Programmer I.