Java Tutorials


Java 8 – Calculate difference between two LocalDateTime

In this short article, we’ll learn how to calculate the difference between two dates in Java 8. We can use […] Continue reading »

How to create Token in Java

In this article, we will show you a few ways to create/generate a unique token in Java. Creating a unique […] Continue reading »

Java 8 – Generating One Time Password (OTP)

In this short article, we’ll look at how to generate One Time Password (OTP) in Java 8. In Java 8, […] Continue reading »

Java 8 Base64 Encoding and Decoding Example

In this guide, we’ll explore the Java 8 Base64 utility class for obtaining encoders and decoders for the Base64 encoding […] Continue reading »

Java- Find all possible Palindrome in given String

In this short article, we’ll show you how to find all possible Palindrome in given String using Java. Let us […] Continue reading »

Java Program for Tower of Hanoi Problem

In this article, we are going to solve the Tower of Hanoi problem using Java program. There are two approaches […] Continue reading »

How to sort Map by Key or Value in Java 8

A Map can also be sorted with stream.sorted() method in Java 8. We can sort the Map based on its […] Continue reading »

Java 8 – How to sort Set with stream.sorted()

In this quick tutorial, we’ll learn how to sort Set in Java 8. stream.sorted() is a predefined method of Stream […] Continue reading »

How to sort list in Java 8

In Java 8, the elements of a list are sorted by calling stream.sorted() method of Stream interface. As we know, […] Continue reading »

Java- Find the index of the two numbers in the array whose sum is equal to a given number

Sometimes interviewer wants to check the candidate’s logical ability and the approach taken to solve the challenge/problem using Java. Question:  […] Continue reading »

Java 8 Stream- Sum of List of Integers

Java 8 Stream interface provides mapToInt() method to convert a stream integers into a IntStream object and upon calling sum() method […] Continue reading »

1 2 3 4 5 9