Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

java
uppercase
communitycreator

What is Character.isUpperCase() in Java?

harris910

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
communitycreator
RELATED COURSES

View all Courses

Keep Exploring