Java isUpperCase() method


Java  Character类Java Character Class


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

grammar

boolean isUpperCase(char ch)

parameter

  • ch -- The character to test.

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 execution result of the above program is:

false
true

Java  Character类Java Character Class