Posts from Java

How to compare two strings lexicographically in Java

By Kamlendra Pratap Singh

Let’s learn how to compare two strings lexicographically in Java. Before proceeding with the tutorial let us understand the term ‘lexicographically‘. Lexicographi.... Read More

Sort a Java array in ascending and descending order

By Mitun Kumar Sahu

An array is a container containing many data of the same type within a single variable in a contiguous manner. It means all data can be of numbers type, string type, etc. In this .... Read More

Difference between next() and nextLine() methods in Java

By Shivam Purohit

Hello programmer, in this tutorial you will be going to learn the difference between next() and nextLine() methods in Java. This tutorial differentiates between next() and nextLine.... Read More

How to check if two given sets are disjoint in Java?

By Shivam Purohit

Hello, developers in this tutorial you will learn how to check if two given sets are disjoint in Java. In this tutorial, you will learn two ways of checking that if the sets are di.... Read More

Java Program to convert a List to Set – 2 ways

By Shivam Purohit

Hello programmers, in this tutorial you are going to learn Java Program to convert a List to a Set. List and set both interface extends the collection framework. The Set interface .... Read More

How to use a package in Java

By Mitun Kumar Sahu

A Java package is a container of a group of related classes, interfaces, and sub-packages like in your device one folder containing multiple different subfolders and every subfolde.... Read More

Remove array elements that contain only numbers from string array in Java

By Mitun Kumar Sahu

A single alphabet, a single digit, symbol, or space within a single quote is known as a character. It requires 2 bytes of memory because in java character is always represented in .... Read More

Find the longest string in an array of strings using Java

By Mitun Kumar Sahu

Pre-requisite knowledge A single alphabet or a single digit or a single symbol or a single space within a single quote is known as a character. It requires 2 bytes of memory becaus.... Read More

Related Posts