Thursday, January 26, 2023

String practice problems and Solutions

 1.Java Program to Count Number of Duplicate Words in String

2.Java Program to Count Number of Words in Given String

3.Java Program to Count the Number of Occurrences of Substring in a String

4.Java Program to Count the Occurrences of Each Character in String

5.Java Program to Merge two String Arrays  

6.Java Program to Remove Duplicate Words from String 

7.Java Program to Reverse a String(5 ways)

8.Java Program to Reverse Each Word of a String    

9.Java Program to Swap Two Strings      

10.How to Check if the String Contains only Digits         

11.How to Check if the String Contains only Letters  

12.How to Check If the String Contains Only Letters or Digits 

13.Java Program to Check if Input String is Palindrome 

14.Java Program to Find all Permutations of String

15.How to Remove or Trim All White Spaces from a String in Java

16.How to Remove Leading and Trailing White Space From a String in Java

17.Java Program to Count Duplicate Characters in a String

18.Remove Character from String in Java (Java 8)

19.Java Program to Count Vowels and Consonants in a String (Java 8)

20>  4 Ways to Find First Non-Repeated Character in String in Java

No comments:

Post a Comment