Skip to content

Tag Archives: Java-String-Programs

Given string str of length N, the task is to check whether the given string contains uppercase alphabets, lowercase alphabets, special characters, and numeric values… Read More
Given string str, the task is to write a Java program to swap the pairs of characters of a string. If the string contains an… Read More
Given a string str and a positive integer k, the task is to write a Java program to print the first k characters of the… Read More
Given string str, the task is to print the middle character of a string. If the length of the string is even, then there would… Read More
Given string str, the task is to write Java Program check whether the given string is a pangram or not. A string is a pangram… Read More
Given string str, the task is to write a Java program to swap the first and the last character of the given string and print… Read More
Given string str, the task is to write Java Program to remove the first and the last character of the string and print the modified… Read More
Given a string in Snake Case, the task is to write a Java program to convert the given string from snake case to camel case… Read More
Given a date, the task is to write a Java program to convert the given date into a string. Examples: Input: date = “2020-07-27” Output:… Read More
Given a string str, the task is to print the first and the last character of the string. Examples: Input: str = “GeeksForGeeks” Output: First:… Read More
To convert String to boolean in Java, you can use Boolean.parseBoolean(string). But if you want to convert String to Boolean object then use the method… Read More
Given a string in camel case, the task is to write a Java program to convert the given string from camel case to snake case… Read More
Given a string, the task is to write a Java program to check whether the string contains only alphabets or not. If so, then print… Read More
Given string str, the task is to remove all non-alphanumeric characters from it and print the modified it.  Examples:  Input: @!Geeks-for'Geeks,123  Output: GeeksforGeeks123  Explanation: at… Read More
Given string str, the task is to write a Java program to check whether a string contains only digits or not. If so, then print… Read More

Start Your Coding Journey Now!