Trusted answers to developer questions

What is Character.isUpperCase() in Java?

Free System Design Interview Course

Many candidates are rejected or down-leveled due to poor performance in their System Design Interview. Stand out in System Design Interviews and get hired in 2024 with this popular free course.

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

RELATED TAGS

java
uppercase
Did you find this helpful?