Here are some important java string problems to practice
Java
String – Level-1
1.
WAP to accept a String from
User and Display it Back on Screen
2.
WAP to accept the First name ,
Middle Name and Last Name of a person and display full name and Short Name (eq- Amar Kumar Singh-
A.K.S)
3.
WAP to accept a String and Count
number of Capital letters present in it.(eq- ComPuter - 2)
4.
WAP to accept a string and
count number of Vowels present in it
5.
WAP to accept a string and
count number of Words Present in it.(eq- Amar Singh-- 2)
6.
WAP of Java String Comparison 2
String
7.
WAP to accept a day name and
display the Day number.(eq-
Monday --1)
8.
WAP to accept a String and
Convert the case of each alphabet present in it.(eq- JaVa---jAvA)
9.
WAP to accept word and check if it is palindrome
10.
WAP of SubString (AMAR SINGH--- R SINGH)
11.
WAP to accept a word and
convert it to piglatin form(trouble --- oubletray)
12.
WAP to accept the name of a
person and guess the gender based on following Table.
Condition |
Gender |
Start with “mr.” |
Male |
Start with “miss” |
Female |
Start with “mrs” |
Married Female |
Ends with “Kumari” |
Female |
Else |
Cannot Determine |
13.
WAP to accept two strings and
tell which comes later in lexicographics order(dictionary order). If equal how
appropriate message.
14.
WAP to replace “15 august” with
“26 january” and “independence” with
“republic” in the string “15 august is independence day”
15. WAP of Trim “
hi ” ----- “hi”.
16.
WAP in java to accept 5
String/Name and Display the names that start with a Vowel
17.
WAP to accept String and Convert its individual characters
to capital and Small alternately.(Amar----- aMaR)
18.
WAP to accept a String count
the frequency of each alphabet in the String.
banana |
||||||
|
19.
WAP to accept a String and
Display it in Title Case.(eq- My
name is covid----- My Name Is Covid)
20.
WAP to accept a sentence and
display the words having
length is greater than 5
21.
WAP to accept a sentence and
extract the palindrome words.
22. WAP to accept a sentence and display the words having double
sequences.(eq- I Like
Rabbit---- rabbit)
23.
WAP to accept roll no, name of
5 students and display them back on the screen in tabular form.
24.
WAP to assign 7 country names
and corresponding wonder names in two separate arrays and after that search a
given country name and display related wonder name.
25.
WAP to accept name, marks of
five students and create merit list based on marks.
PATTERN
1.
WAP to print the word “JAVA” in following pattern-
J
JA
JAV
JAVA
2.
WAP to print the word “iLoVeJava” in following pattern
i
iLi
iLoLi
iLoVoLi
iLoVeVoLi
iLoVeJeVoLi
iLoVeJaJeVoLi
iLoVeJavaJeVoLi
iLoVeJavavaJeVoLi
3. WAP to print the Following
Pattern
C O M P U T E R
O M P U T E R
M P U T E R
P U T E R
T E R
E R
R
4. WAP to display following
pattern
J A V A
A V A j
V A j a
A j a v
J a v a
Comments
Post a Comment