Skip to content

Tag Archives: Java-String-Programs

Here we are converting a string into a primitive datatype. It is recommended to have good knowledge of Wrapper classes and concepts like autoboxing and… Read More
Given a string and a character, the task is to make a function that counts the occurrence of the given character in the string using… Read More
Given two strings str1 and str2. The task is to check if the two given strings are same if a case-insensitive comparison is followed, i.e.,… Read More
JSON Stand for JavaScript Object Notation. It’s a standard text-based format which shows structured data based on JavaScript object syntax. It is commonly used for… Read More
Given a string, move all Uppercase alphabets char to the end of the String.  Examples:  Input : Geeksforgeeks A Computer Science Portal for Geeks!! Output… Read More
JSON stands for JavaScript Object Notation. It’s a standard text-based format that shows structured data based on JavaScript object syntax. It is commonly used for… Read More
Given a String, the task is to insert another string in between the given String at a particular specified index in Java. Examples: Input: originalString… Read More
Given a size as n, The task is to generate a random alphanumeric String of this size. Below are various ways to generate random alphanumeric… Read More
There are many ways to compare two Strings in Java:   Using == operator Using equals() method Using compareTo() method Using compareToIgnoreCase() method Using compare() method… Read More
Given a List of String, the task is to convert the List to a comma separated String in Java. Examples: Input: List<String> = ["Geeks", "ForGeeks",… Read More
In Java, as we all know ArrayList class is derived from the List interface. Here we are given an ArrayList of strings and the task… Read More
 In Java, here we are given a string, the task is to replace a character at a specific index in this string. Examples:  Input: String… Read More
Given a String, the task is to convert it into comma separated List. Examples: Input: String = "Geeks For Geeks" Output: List = [Geeks, For,… Read More
Given a Set of String, the task is to convert the Set to a comma separated String in Java. Examples: Input: Set<String> = ["Geeks", "ForGeeks",… Read More
Given a String with extra delimiter at the end, the task is to remove this extra delimiter in Java. Examples: Input: String = "Geeks, For,… Read More

Start Your Coding Journey Now!