AmitDiwan has Published 11365 Articles

Java Program to Create random strings

AmitDiwan

AmitDiwan

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

592 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 a list into Two Halves

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 12:13:11

1K+ Views

In this article, we will understand how to split a list into two halves. 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 a ... Read More

Java Program to split into a number of sub-strings

AmitDiwan

AmitDiwan

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

458 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 Print even length words

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 11:57:44

1K+ Views

In this article, we will understand how to print even length words. String is a datatype that contains one or more characters and is enclosed in double quotes (“ ”). Char is a datatype that contains an alphabets or an integer or an special character.Below is a demonstration of the ... Read More

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

AmitDiwan

AmitDiwan

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

295 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 Print first letter of each word using regex

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 11:36:28

412 Views

In this article, we will understand how to print first letter of each word using regex. A regular expression is a sequence of characters that forms a search pattern. A regular expression can be a single character, or a more complicated pattern.A regular expression helps you match or find other ... Read More

Java Program to Check Whether the Given String is Pangram

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 11:30:38

378 Views

In this article, we will understand how to check whether the given string is pangram. A string is a pangram string if it contains all the character of the alphabets ignoring the case of the alphabets.Below is a demonstration of the same −Suppose our input is −Input string: AbcdefghijklmnopqrstuvwxyzThe desired ... Read More

Java Program to Swap Pair of Characters

AmitDiwan

AmitDiwan

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

1K+ Views

In this article, we will understand how to swap pair of characters in Java. We will convert the given string to character array. This will allow us to swap pair of characters.Below is a demonstration of the same −Suppose our input is −Input string: Java programThe desired output would be ... Read More

Java Program to Sort a String

AmitDiwan

AmitDiwan

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

2K+ 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

Java Program to Reverse a String Using Stacks

AmitDiwan

AmitDiwan

Updated on 29-Mar-2022 11:11:44

1K+ Views

In this article, we will understand how to reverse a string using stacks. String is a datatype that contains one or more characters and is enclosed in double quotes(“ ”). The stack is a linear data structure that is used to store the collection of objects. It is based on ... Read More

Advertisements