The document contains two Java programs: one for checking if a string is a palindrome and another for counting vowels and consonants in a sentence. The palindrome checker compares the input string with its reversed version, while the vowel and consonant counter iterates through the input sentence to tally the counts. Example outputs include 'madam is a palindrome' and 'Vowels: 3, Consonants: 7'.
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 ratings0% found this document useful (0 votes)
0 views2 pages
Full 20 A4 Java Programs NoLabel
The document contains two Java programs: one for checking if a string is a palindrome and another for counting vowels and consonants in a sentence. The palindrome checker compares the input string with its reversed version, while the vowel and consonant counter iterates through the input sentence to tally the counts. Example outputs include 'madam is a palindrome' and 'Vowels: 3, Consonants: 7'.