Java String Programs With Solutions

Java String Programs With Solutions


1 . Write a Java-program to Count the number of vowels in a given string ?
2 . Write a Java-program to Count the number of Consonants in a given string ?
3 . Write a Java-program to Count the number of spaces in a given string
4 . Write a Java-program to Count the number of special characters in a given string ?
5 . Write a Java-program to Count the number of letters in a given string ?
6 . Write a Java-program to Count the number of Numbers in a given string ?
7 . Write a Java-program to Remove vowels in a given string ?
8 . Write a Java-program to Remove consonants in a given string ?
9 . Write a Java-program to Remove special characters in a given string ?
10 . Write a Java-program to Remove spaces in a given string ?
11 . Write a Java-program to Remove letters in a given string ?
12 . Write a Java-program to Remove numbers in a given string ?
13 . Write a Java-program to print duplicate characters from the string ?
14 . Write a Java-program to print unique(distinct (or non-repeating characters) ) characters from the string ?
15 . Write a java program How to check if two strings are anagrams of each other?
16 . How to reverse a string in Java without using the reverse method ?
17 . How to count the occurrence of the given character in a string?
18 . How to check if a string is a palindrome?
19 . How to count the number of words in a given string sentence?
20 . How to reverse the words from the given string sentence?
21 . How to swap two strings without using the third variable?


MSK TechnologiesTrainings