Java 8 BiFunction Examples

Java 8 BiFunction BiFunction is a functional interface introduced in Java 8.BiFunction interface’s method takes two parameter (T and U ) and returns one parameter(R) as output. Syntax: @FunctionalInterface public interface BiFunction { R apply(T t, U u); } T: Type of the first argument to the function U: Type of the second argument to … Read more

Functional Interfaces in Java

Functional Interfaces in Java In Java, being an object oriented programming language, everything revolves around Objects and classes.If we want to write a simple one statement for displaying a message using System.out.print then also we need to write a class to have such method.Means we can’t write any function/method without writing a class in java. … Read more

Exception Handling in Java(With Examples)

Exception Handling Exception is an abnormal condition in a java program which disrupts the normal flow the program.Few examples are bad coding, wrong input data, network connectivity issue etc. Technically exception is and object that contains the exceptional details like error message and line at which issue has happened etc.When such a situation arise in … Read more

Understanding ArrayList in Java (With Examples)

ArrayList in Java ArrayList provides the dynamic array for storing the elements. ArrayList is a class in Java collection framework.It comes under java.util package. Need for ArrayList: We use ArrayList when we need to do lot of modifications to the elements. Feature of ArrayList: 1)ArrayList is similar to Array but there is no limit on … Read more