- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Program to check whether the entered value is ASCII 7 bit alphabetic uppercase
To check whether the entered value is ASCII 7-bit alphabetic uppercase, check the character from ‘A’ to ‘Z’.
Here, we have a character.
char one = 'T';
Now, we have checked a condition with if-else to check for uppercase character from ‘A’ to ‘Z’
if (one >= 'A' && one <= 'Z') { System.out.println("Given character is in uppercase!"); } else { System.out.println("Given character is not in uppercase!"); }
Example
public class Demo { public static void main(String []args) { char one = 'T'; System.out.println("Character: "+one); if (one >= 'A' && one <= 'Z') { System.out.println("Given character is in uppercase!"); } else { System.out.println("Given character is not in uppercase!"); } } }
Output
Character: T Given character is in uppercase!
Let us see another example −
Example
public class Demo { public static void main(String []args) { char one = 'e'; System.out.println("Character: "+one); if (one >= 'A' && one <= 'Z') { System.out.println("Given character is in uppercase!"); } else { System.out.println("Given character is not in uppercase!"); } } }
Output
Character: e Given character is not in uppercase!
- Related Articles
- Java Program to check whether the entered value is ASCII 7 bit alphabetic
- Java Program to check whether the entered value is ASCII 7-bit alphabetic lowercase
- Java Program to check whether the entered value is ASCII 7-bit control character
- Java Program to check whether the entered character is ASCII 7 bit numeric and character
- Java Program to check whether the character is ASCII 7 bit
- Java Program to check whether the character is ASCII 7 bit numeric
- Java Program to check whether the character is ASCII 7 bit printable
- Check whether the entered value is whitespace or not in Java
- Check whether the entered value is a digit or not in Java
- Check whether the entered value is a letter or not in Java
- C# Program to Check Whether the Entered Number is an Armstrong Number or Not
- Check whether a character is Uppercase or not in Java
- 8085 program to add even parity to a string of 7 bit ASCII characters.
- Java Program to check whether the entered character a digit, white space, lower case or upper case character
- 8085 program to check whether the given 16 bit number is palindrome or not

Advertisements