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'));
}
}

Free Resources