Java isUpperCase() Method

Java  Character类Java Character Class


The isUpperCase() method is used to determine whether the specified character is an uppercase letter.

Syntax

boolean isUpperCase(char ch)

Parameters

  • ch-- the character to be tested.

Return Value

Returns true if the character is uppercase; otherwise, returns false.

Example

public class Test {

    public static void main(String args[]) {
        System.out.println( Character.isUpperCase('c'));
        System.out.println( Character.isUpperCase('C'));
    }
}

The result of executing the above program is:

false
true

Java  Character类Java Character Class

Other Extensions