Computer Applications
Create a program to display whether the entered character is in uppercase or lowercase.
Answer
public class KboatLetterCheck
{
public static void checkLetter(char ch) {
System.out.println("Entered character: " + ch);
if (ch >= 65 && ch <= 90)
System.out.println("Uppercase");
else if (ch >= 97 && ch <= 122)
System.out.println("Lowercase");
else
System.out.println("Not a letter");
}
}
Output
Related Questions
Write a program to print all the prime numbers between 1 and 100.
Write a program to print the largest of three numbers.
Write a Java program using the switch case to print the corresponding days of numbers.
For example: 1= Monday…. 7 = Sunday
Write a program to print the Fibonacci series upto 10 terms.
[A series of numbers in which each number is the sum of the two preceding numbers.For example: 0,1,1,2,3, …………… n].