Skip to content

Tag Archives: Java 8

Default method in Java is a method in java which are defined inside the interface with the keyword default is known as the default method.… Read More
Creating Thread Safe ConcurrentHashSet is not possible before JDK 8 because of the java.util.concurrent package does not have a class called ConcurrentHashSet, but starting with… Read More
Multithreading in Java is a process of executing two or more threads simultaneously to maximum utilization of CPU. Multithreaded applications execute two or more threads… Read More
The string can be repeated N number of times, and we can generate a new string that has repetitions. repeat() method is used to return… Read More
In Java, we have already defined, exception classes such as ArithmeticException, NullPointerException etc. These exceptions are already set to trigger on pre-defined conditions such as… Read More
API is an acronym for Application Programming Interface, which is software and the java streams work on a data source. Consider a stream like a… Read More
Data Structures are a boon to everyone who codes. But is there any way to convert a Data Structure into another? Well, it seems that… Read More
A lambda expression is one or more line of code which works like function or method. It takes a parameter and returns the value. Lambda… Read More
Park–Miller random number generator is also known as Lehmer random number generator. A general formula of a random number generator (RNG) of this type is,… Read More
ArrayList is a resizable array. It is under the java package java.util. It gives dynamic arrays in Java. ArrayList is useful in programs where a… Read More
Java is one of the most popular languages and supports many enterprise applications. Running Java on local machines requires the installation of Java IDE, Java… Read More
Problem Description: Write a Java program that accepts a matrix of M × N order and then interchange diagonals of the matrix. Steps:   1. We… Read More
1. Java Server Pages (JSP) : JSP stands for Java Server Pages. These files have the extension. jsp. The main advantage of JSP is that… Read More
We can have a method name same as a class name in Java but it is not a good practice to do so. This concept… Read More
Here, we will discuss the Arithmetic expression having operators like addition and multiplication and you will see how you can take an expression and can… Read More