What is Character.isUpperCase() in Java?

The isUpperCase() function returns true if the character sent as a parameter is uppercase; otherwise, it returns false.

Figure 1 shows a visual representation of the isUpperCase() function.

Figure 1: Visual representation of isUpperCase() function

Syntax

boolean isUpperCase(char character)

Parameter

The isUpperCase() function takes the character as a parameter.

Return value

The isUpperCase() function returns true if the character sent as a parameter is uppercase; otherwise, it returns false.

Code

class JAVA {
public static void main( String args[] ) {
//uppercase character
System.out.println("Character.isUpperCase('E'):");
System.out.println(Character.isUpperCase('E'));
//lowercase character
System.out.println("Character.isUpperCase('e'):");
System.out.println(Character.isUpperCase('e'));
}
}
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources