Skip to content

Tag Archives: Java-Strings

Given a list of characters. Write a Java program to convert the given list to a string. Input : list = {'g', 'e', 'e', 'k',… Read More
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can… Read More
String is a sequence of characters. In Java, objects of String are immutable which means they are constant and cannot be changed once created. Below… Read More
Java Set is a part of java.util package and extends java.util.Collection interface. It does not allow the use of duplicate elements and at max can… Read More
Regular Expressions or Regex is an API for defining String patterns that can be used for searching, manipulating, and editing a text. It is widely… Read More
Lambda expressions basically express instances of functional interfaces (An interface with a single abstract method is called functional interface. An example is java.lang.Runnable). lambda expressions… Read More
Given a string, now as of we all know that the task is to check whether a string contains only alphabets. Now we will be… Read More
Given two strings s1 and s2, write a snippet to check whether s2 is a rotation of s1. Strings may contain duplicates. Examples: Input :… Read More
Given a string str, consisting of non-alphabetical characters. The task is to remove all those non-alphabetical characters of str and print the words on a… Read More
Given a string, the task is to write a program in Java which prints the number of occurrences of each character in a string. Examples: … Read More
Before proceeding further with the fuss of immutability, let’s just take a look into the String class and its functionality a little before coming to… Read More
The java.lang.StringBuilder.append() method is used to append the string representation of some argument to the sequence. There are 13 ways/forms in which the append() method… Read More
Prerequisite: Dynamic Programming | Set 5 (Edit Distance) Given two strings str1 and str2, the task is to print the all possible ways to convert ‘str1’… Read More
The StringBuffer.replace() is the inbuilt method which is used to replace the characters in a substring of this sequence with the characters in the specified… Read More
The java.lang.StringBuffer.delete() is an inbuilt method in Java which is used to remove or delete the characters in a substring of this sequence. The substring… Read More

Start Your Coding Journey Now!