java examples
Home Java Examples Resources Java Interview Questions
Brainpower SEO

How to know if a character is uppercase?

public class CharacterIsUpperCase
{
    public static void main(String[] args)
    {
        char c = 'A';
        if (Character.isUpperCase(c))
        {
            System.out.println(c + 
                " is an uppercase character");
        }
    }
}