Posts related to tag: Java


Java- Count number of pairs in the Array whose sum is zero

This Java example will help to solve a given scenario. Scenario: Write down a Java program that calculates the number […] Continue reading »

Difference between trim() and strip() methods in Java

In this article, you will learn the difference between trim() and strip() methods of the String class in Java. trim() […] Continue reading »

Java – isBlank() vs isEmpty() method of String class

In this short article, you will get to know about the difference between the isBlank() and isEmpty() methods of the […] Continue reading »

Java – Capitalize the first letter of a String

In this short tutorial, you will get an idea of how to capitalize the first letter of a string. In […] Continue reading »

Get all available Currency code and name in Java

In Java, getAvailableCurrencies() is a static method of Currency class that returns all available currencies. Currency class is inside the […] Continue reading »

Different ways to iterate/loop a List of Integers in Java

In Java, you can iterate or loop a List object in different ways. In this short example, you will find […] Continue reading »

Java- Find the element in the List having maximum value

In Java 8, Stream API’s max method returns the maximum element of this stream according to the provided Comparator and […] Continue reading »

Java- Find all Capital Letters in the String

In this short tutorial, we’ll find all the capital letters in the given String using Java. Character.isUpperCase(char ch) returns true […] Continue reading »

How to generate QR Code in Java

QRGen library provides an API to generate the QR Code in a Java application. It is built on the top […] 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 »

1 3 4 5 6 7 9