Java String Programs

Master fundamental Java concepts with these beginner-friendly programs

Reverse String

A program to reverse a given string.

Palindrome Check

A program to check whether a given string is a palindrome.

Reverse String

A program to reverse a given string.

Palindrome Check

A program to check whether a given string is a palindrome.

Vowels and Consonants Count

A program to count vowels and consonants in a string.

Case Conversion

A program to convert a string to uppercase and lowercase.

String Length

A program to find the length of a string without using .length().

Word Count

A program to count the number of words in a sentence.

Anagram Check

A program to check if two strings are anagrams.

Remove Duplicates

A program to remove duplicate characters from a string.

Most Frequent Character

A program to find the most frequent character in a string.

Swap First & Last

A program to swap the first and last characters of a string.

Digits Only Check

A program to check if a string contains only numeric digits.

Character Count

A program to count the occurrences of a character in a string.

First Non-Repeating Character

A program to find the first non-repeating character in a string.

Check Rotations

A program to check if one string is a rotation of another.

Remove Whitespaces

A program to remove all spaces from a given string.

Check if Pangram

A program to check if a string contains every letter of the alphabet at least once.

Replace a Word

A program to replace a specific word in a sentence.

Longest Word in Sentence

A program to find the longest word in a given sentence.

Convert String to Char Array

A program to convert a given string into a character array and print each character.

Valid Email Address

A program to check whether a given string is a valid email address.