0% found this document useful (0 votes)
28 views1 page

ProgramsofString

Uploaded by

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

ProgramsofString

Uploaded by

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

1)Write a program to input a String and generate a new String with reverse of each

word without changing the order of words.


For example: Input: ALL THE BEST
Output: LLA EHT TSEB

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

3)Write a program to accept a word and convert it into lowercase if it is in uppercase,


and display the new word by replacing only the vowels with the character following it.
Example: Sample Input: computer
Sample Output: cpmpvtfr

4) Write a program to accept a String in uppercase, and generate a new string by


replacing each vowels with next vowel in cyclic order.
Example :- input: - COMPUTER PROGRAMMING IS FUN.
Output: - CUMPATIR PRUGREMMONG OS FAN.

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.

You might also like