AmitDiwan has Published 10744 Articles

Java Program to Convert the LinkedList into an Array and vice versa

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 08:20:05

402 Views

In this article, we will understand how to convert the linked list into an array and vice versa. The java.util.LinkedList class operations perform we can expect for a doubly-linked list. Operations that index into the list will traverse the list from the beginning or the end, whichever is closer to ... Read More

Java Program to Merge two lists

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 07:32:25

476 Views

In this article, we will understand how to merge two lists. 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 the duplicate elements.Below is a demonstration of ... Read More

Java Program to Implement switch statement on strings

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 06:08:59

282 Views

In this article, we will understand how to implement switch statement on strings. The switch expression is evaluated once. The value of the expression is compared with the values of each case. String is a datatype that contains one or more characters and is enclosed in double quotes(“ ”).Below is ... Read More

Java Program to Replace the Spaces of a String with a Specific Character

AmitDiwan

AmitDiwan

Updated on 30-Mar-2022 05:49:41

1K+ Views

In this article, we will understand how to replace the spaces of a string with a specific character. 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 Program is ... Read More

Java Program to Join Two Lists

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 13:50:24

343 Views

In this article, we will understand how to join two lists. The ArrayList class extends AbstractList and implements the List interface. ArrayList supports dynamic arrays that can grow as needed.Array lists are created with an initial size. When this size is exceeded, the collection is automatically enlarged. When objects are ... Read More

Java Program to Remove a Sublist from a List

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 12:28:04

422 Views

In this article, we will understand how to remove a sub-list 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 the duplicate elements.Below is ... Read More

Java Program to Create random strings

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 12:18:27

748 Views

In this article, we will understand how to create random strings. 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 −The size of the string is defined as: 10The desired output would ... Read More

Java Program to split into a number of sub-strings

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 12:09:04

679 Views

In this article, we will understand how to splitting into a number of sub-strings. String is a datatype that contains one or more characters and is enclosed in double quotes(“ ”). A part or a subset of string is called substring.Below is a demonstration of the same −Suppose our input ... Read More

Java Program to Determine the Unicode Code Point at a given index

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 11:39:21

426 Views

In this article, we will understand how to determine the unicode code point at a given index. Each character is represented by a unicode code point. A code point is an integer value that uniquely identifies the given character. Unicode characters can be encoded using different encodings, like UTF-8 or ... Read More

Java Program to Sort a String

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 11:21:25

3K+ Views

In this article, we will understand how to sort a string. String is a datatype that contains one or more characters and is enclosed in double quotes(“ ”). Strings are a sequence of charactersBelow is a demonstration of the same −Suppose our input is −Input string: javaprogramThe desired output would ... Read More

Advertisements