0% found this document useful (0 votes)
2 views2 pages

Java String Programs Easy Moderate Tough-2

The document outlines a collection of 40 Java string programming exercises categorized into three difficulty levels: Easy, Moderate, and Tough. Each category contains a list of specific tasks, ranging from basic string manipulations to complex algorithms. The exercises are designed to aid in practice, exams, and interviews, with explanations and code provided for each program.

Uploaded by

subhaguru426
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Java String Programs Easy Moderate Tough-2

The document outlines a collection of 40 Java string programming exercises categorized into three difficulty levels: Easy, Moderate, and Tough. Each category contains a list of specific tasks, ranging from basic string manipulations to complex algorithms. The exercises are designed to aid in practice, exams, and interviews, with explanations and code provided for each program.

Uploaded by

subhaguru426
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java String Programming – Easy, Moderate &

Tough (40 Programs)


EASY (1–10)
1. Find length of a string
2. Convert to uppercase
3. Convert to lowercase
4. Check if string is empty
5. Reverse a string
6. Count vowels
7. Check equality of strings
8. First character of string
9. Last character of string
10. Concatenate strings

MODERATE (11–30)
11. Palindrome check
12. Word count
13. Count consonants
14. Remove spaces
15. Replace vowels
16. Digits only check
17. Character frequency
18. Longest word
19. Capitalize each word
20. Remove duplicate characters
21. Substring check
22. First occurrence of character
23. Uppercase letter count
24. Lowercase letter count
25. Swap first and last character
26. Remove special characters
27. Anagram check
28. Extract digits from string
29. Word frequency in sentence
30. Reverse each word

TOUGH (31–40)
31. Longest palindromic substring
32. Rearranged palindrome check
33. First non-repeating character
34. Total substring count
35. Longest common prefix
36. Pattern matching
37. String compression
38. Minimum window substring
39. Remove consecutive duplicates
40. String permutations

Note: All programs were explained and coded in Java step-by-step during practice.
Prepared for Practice, Exams & Interviews ■

You might also like