Java Lab Task
Java Lab Task
College of informatics
Information Technology Department
Programming Fundamental II
Hint
• use char data
type instead of
int.
• Use if
statement to
determine
letter T
• Use break
statement to
terminate the
loop
2
Task 2 : write a java program to read any String then print :
A. The number of characters
B. String letters in upper case
C. Fifth letter in uppercase of the string
D. check weather the word contain the letter b
3
Task3 : write a program to count the total number of character [e] in any String that entered by the
user
4
Task 3-2 :write a program to count the total number of any character in any String that entered by
the user
5
Task4 : Write a program that reads a string and prints each character of the word on a separate line in
opposite order
6
Task5 : write a program that reads in three strings [names] and sorts them as alphabetical order
7
Task 6-1 : Write a java program that ask the user to enter a letter and check whether the
letter is a vowel or consonant , then display its Unicode
Primitive datatype casting
8
Task 6 : repeat task (6-1) to determine a vowel or consonant for 7 character