In Java 8, Predicate is a functional interface, which accepts an argument and returns a boolean. Usually, it used to apply in a filter for a collection of objects. What is the purpose of predicate T interface? Predicate is a generic functional interface that represents a single argument function thatRead More →

Throwing Exceptions When an exception is thrown the method stops execution right after the “throw” statement. Any statements following the “throw” statement are not executed. Does execution continue after catch Java? The program resumes execution when the exception is caught somewhere by a “catch” block. Catching exceptions is explained later.Read More →

lang which contains string class, StringBuffer class, StringBuilder class, all wrapper classes, runnable interface, etc. String class contains a number of methods such as length(), toUpperCase(), toLowerCase() etc. 2. Java contains 14 predefined packages which are main packages. Which is the largest package in Java? PortableInterceptor package contains the largestRead More →

The main difference between EJB and Java Beans is that the EJB is a server-side software component that encapsulates the business logic of an application while JavaBeans are classes that encapsulates multiple objects into a single object that helps to create reusable software components for Java. Are JavaBeans coffee? JavaRead More →