Java Data Type Tutorial - Java Character.isUpperCase(char ch)








Syntax

Character.isUpperCase(char ch) has the following syntax.

public static boolean isUpperCase(char ch)

Example

In the following code shows how to use Character.isUpperCase(char ch) method.

It uses Character.isUpperCase method to tell is a char a uppercase char

public class Main {
  public static void main(String[] args) {
    char symbol = 'A';
/*from   w ww  .  j av  a 2 s .c  om*/
    if (Character.isUpperCase(symbol)) {
      System.out.println("true");
    }else{
      System.out.println("false");
    }
  }
}

The code above generates the following result.