admin

admin

Lambda Expressions and Functional Interface

Lambda expressions was added to Java by JDK 8.  Introducing Lambda Expressions Key to understanding Java’s implementation of lambda expressions are two constructs. The first is the lambda expression, itself. The second is the functional interface. Let’s begin with a simple definition of each.  A lambda expression is,…

Generics

Generic Fundamentals A Simple Generic Example Bounded Types Sometimes it is useful to limit the types that can be passed to a type parameter. For example, assume that you want to create a generic class that contains a method that returns the average of an…

Polymorphism

Overview Why Override Methods? Using Abstract Methods There are situations in which you will want to define a superclass that declares the structure of a given abstraction without providing a complete implementation of every method. That is, sometimes you will want to…