ProgramsofString
ProgramsofString
2)Write a program to input a String and display the longest and smallest word of the
String.
For example: Input: Honesty is the best policy.
Output: Longest word: Honesty.
Smallest word: is
5) Write a program in java to accept a string in lower case and change the first letter of
every word to upper case. Display the new string.
Sample input : we are in cyber world
Sample output: We Are In Cyber World
6) Write a program to accept a word and display the same in piglatin form. A word is said to
be in piglatin if it is obtained by framing a new word with the first vowel present in the word
with the remaining letters present before the first vowel and ended with “AY”
Example : Input : Piglatin
Output: IGLATINPAY
7) Write a program to accept a sentence and a word and count the frequency of the given
word in the sentence.
8) Write a program to input a string and count number of double letter sequence in the
string
Example:- Input : Committee
Number of double letter sequence= 3
9) Write a program to accept a sentence and generate a new sentence replacing multiple
space with single space between words
10) Write a program to accept a word and check whether it is a Unique Word or not? A
word is unique if it does not contain repeated letters in it.