Introduction to UnaryOperator Functional Interface
Interface Name Description Abstract Method UnaryOperator<T> Accepts a single (reference type) input argument and returns a result of same type. …
Interface Name Description Abstract Method UnaryOperator<T> Accepts a single (reference type) input argument and returns a result of same type. …
Interface Name Description Abstract Method BinaryOperator<T> Accepts two (reference type) input argument of same type and returns a result of …
Interface Name Description Abstract Method Function<T, R> Accepts one argument and produces a result. R apply(T t) DoubleFunction<R> Accepts a …
Interface Name Description Abstract Method Consumer<T> Accepts a single (reference type) input argument and returns no result void accept(T t) …
Interface Name Description Abstract Method Supplier<T> A supplier of a result (reference type) T get() DoubleSupplier A supplier of double …
Interface Name Description Abstract Method Predicate<T> Accepts one arguments (reference type) boolean test(T t) DoublePredicate Accepts double value arguments boolean …
Using Object Oriented Programming approach Using Lambda Expression
Java is a object oriented programming language where objects and classes are the main entities. If we create a function, …