AmitDiwan has Published 11365 Articles

Java Program to Get Minimum and Maximum From a List

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:57:32

553 Views

In this article, we will understand how to get minimum and maximum from a list. A list is an ordered collection that allows us to store and access elements sequentially. It contains the index-based methods to insert, update, delete and search the elements. It can also have duplicate elements.Below is ... Read More

Java Program to Check if a String is Empty or Null

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:53:24

690 Views

In this article, we will understand how to check if a string is empty or null. String is a datatype that contains one or more characters and is enclosed in double quotes(“ ”).Below is a demonstration of the same −Suppose our input is −Input string: nullThe desired output would be ... Read More

Java Program to Remove All Whitespaces from a String

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:49:04

248 Views

In this article, we will understand how to remove all whitespaces from a string. String is a datatype that contains one or more characters and is enclosed in double quotes(“ ”).Below is a demonstration of the same −Suppose our input is −Input string: Java programming is fun to learn.The desired ... Read More

Java Program to Convert Collection into Array

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:40:37

496 Views

In this article, we will understand how to convert collection into array. The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and deletion.Below is ... Read More

Java Program to Format time in AM-PM format

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:36:20

1K+ Views

In this article, we will understand how to format time in AM-PM format. A formatting string describes how a date/time values should be read and written from(to) string representation (flat files, human readable output, etc.)Below is a demonstration of the same −Suppose our input is −Current date: Thu Mar 17 ... Read More

Java Program to Shuffle the Elements of a Collection

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:34:13

199 Views

In this article, we will understand how to shuffle the elements of a collection. The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and ... Read More

Java Program to Get the Size of the Collection

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:31:33

108 Views

In this article, we will understand how to get the size of the collection. The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and ... Read More

Java Program to Compare Elements in a Collection

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:28:30

551 Views

In this article, we will understand how to compare elements in a collection. The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and deletion.Below ... Read More

Java Program to Lookup enum by String value

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:24:22

622 Views

In this article, we will understand how to lookup enum by string value. An enum is a special "class" that represents a group of constants (unchangeable variables, like final variables).Below is a demonstration of the same −Suppose our input is −The string is to lookup is: JavaThe desired output would ... Read More

Java Program to Print a Collection

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:24:21

588 Views

In this article, we will understand how to print a collection. The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and deletion.Below is a ... Read More

Advertisements