Skip to content

Tag Archives: Java-String-Programs

Java program to print all unique words present in the string. The task is to print all words occurring only once in the string. Illustration:… Read More
Given a string, the task is to count all palindrome substring in a given string. Input : aba Output : 4 Explanation : All palindrome… Read More
Given a string and a word that task to remove the word from the string if it exists otherwise return -1 as an output. For… Read More
Given a string containing n numbers of words. The task is to swap the corner words of the string and reverses all the middle characters… Read More
Given a string that contains uppercase letters as well as lower case letters. The task is to move all uppercase characters at the end of… Read More
HashMap<Key, Value> provides the basic implementation of the Map interface of Java and import java.util.HashMap package or its superclass. HashMap stores the data in (Key,… Read More
When two binary strings are added, then the sum returned is also a binary string. Example: Input : x = "10", y = "01" Output:… Read More
Regular Expressions or Regex (in short) is an API for defining String patterns that can be used for searching, manipulating, and editing a string in… Read More
Problem Statement: Given a String extract the substring enclosed in single quotes (‘) using Java Regex.  Java regex is an API for pattern matching with… Read More
The Wagner-Fischer Algorithm is a dynamic programming algorithm that measures the Levenshtein distance or the edit distance between two strings of characters. Levenshtein Distance(LD) calculates… Read More
In Java, strings are objects that are backed internally by a char array. So to convert a string to a byte array, we need a… Read More
In java, the string is a sequence of characters and char is a single digit used to store variables. The char uses 2 bytes in… Read More
OutputStream is an abstract class that is available in the package. As it is an abstract class in order to use its functionality we… Read More
The string is a sequence of characters including spaces. Objects of String are immutable in java, which means that once an object is created in… Read More
Bob is a small kid and just learned to count numbers. He sat in his house and started playing with his number of toys. He… Read More

Start Your Coding Journey Now!