Java Character isAlphabetic() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Java 7+

Definition

In Java, Character.isAlphabetic(codePoint) returns true when the code point has the Unicode Alphabetic property. That covers every character isLetter() accepts, plus two more groups.

The extra groups are letter numbers (category LETTER_NUMBER, such as ROMAN NUMERAL ONE, U+2160) and characters with the Other_Alphabetic property, such as many vowel signs in Indic scripts. If you are checking whether a word is "made of letters" in languages like Hindi, isAlphabetic is usually the better choice.

A static method of java.lang.Character (Java 7+): call it on the class, as in Character.isAlphabetic(...); you do not need a Character object. No import is needed, because java.lang is always available.

Unicode version.

The answer comes from the Unicode Character Database built into your JDK, and each Java release follows a specific Unicode version (Java 8, for example, uses Unicode 6.2). The characters used on this page have had the same properties for many Unicode versions, so the examples print the same result on any current JDK.

Syntax

There is only an int overload; a char argument is widened to int automatically.

Java
Character.isAlphabetic('a');        // true (char widens to int)
Character.isAlphabetic('\u2160');   // true, ROMAN NUMERAL ONE
Character.isLetter('\u2160');       // false
Character.isAlphabetic('5');        // false
CallWhat it does
Character.isAlphabetic(c)Test a char (widened to int).
Character.isAlphabetic(s.codePointAt(i))Test a full code point read from a String.
Character.isAlphabetic(cp) && !Character.isLetter(cp)Find the "extra" alphabetic characters that are not letters.

Unlike most tests, isAlphabetic has no char overload because it was added in Java 7, after code point support. On Java 6 and older, the closest test is isLetter(cp) || Character.getType(cp) == Character.LETTER_NUMBER (which still misses Other_Alphabetic characters).

Library declarations
Java
// java.lang.Character (since Java 7)
public static boolean isAlphabetic(int codePoint)

Parameters

ParameterDescription
codePoint (int)The Unicode code point to test. A char works too.

Return Value

Return ValueDescription
trueThe category is one of the five letter categories or LETTER_NUMBER, or the character has the Other_Alphabetic property.
falseDigits, punctuation, symbols, spaces, most combining accents, and invalid code points.

Compare with Similar Methods

How it compares with the other letter tests:

MethodHow it differs
isLetter(cp)Only the five letter categories; no Roman numerals or vowel signs.
isIdeographic(cp)Only ideographs such as Chinese characters (Java 7+).
isLetterOrDigit(cp)isLetter plus decimal digits.
getType(cp)Returns the category itself, such as LETTER_NUMBER (10).

Java Examples

Example 1 — Where isAlphabetic and isLetter Disagree

A letter, a Roman numeral, a Devanagari vowel sign, a combining accent, and a digit.

Java
public class CharacterIsAlphabeticVsLetter {
    public static void main(String[] args) {
        int[] cps = {'a', 0x2160, 0x093E, 0x0301, '7'};
        for (int cp : cps) {
            System.out.println(cp + " alphabetic=" + Character.isAlphabetic(cp)
                    + " letter=" + Character.isLetter(cp));
        }
    }
}

How It Works

  1. char literals in an int array. 'a' and '7' are widened to 97 and 55, so code points and characters can share one array.
  2. Two extra matches. ROMAN NUMERAL ONE (8544) is a letter number, and DEVANAGARI VOWEL SIGN AA (2366) has the Other_Alphabetic property, so isAlphabetic says true while isLetter says false.
  3. Accents are not alphabetic. COMBINING ACUTE ACCENT (769) is a non-spacing mark without the Alphabetic property, so both tests reject it, just like the digit.

Example 2 — Check a Hindi Word Letter by Letter

The Hindi word "kaam" is written with a consonant, a vowel sign, and another consonant. Only one of the two tests accepts all three.

Java
public class CharacterIsAlphabeticWord {
    public static void main(String[] args) {
        String word = "\u0915\u093E\u092E";
        boolean allLetters = true;
        boolean allAlphabetic = true;
        for (int i = 0; i < word.length(); i++) {
            char c = word.charAt(i);
            allLetters &= Character.isLetter(c);
            allAlphabetic &= Character.isAlphabetic(c);
        }
        System.out.println("chars: " + word.length());
        System.out.println("all isLetter: " + allLetters);
        System.out.println("all isAlphabetic: " + allAlphabetic);
    }
}

How It Works

  1. Escapes keep the source ASCII. \u0915 is the consonant KA, \u093E the vowel sign AA, and \u092E the consonant MA; all three fit in single chars.
  2. An AND that accumulates. allLetters &= ... stays true only while every character passes, so one failure is enough to flip it.
  3. The vowel sign decides. U+093E is a spacing combining mark, not a letter, so isLetter rejects the word; its Other_Alphabetic property makes isAlphabetic accept it.

Example 3 — Count Alphabetic Code Points, Including One Above U+FFFF

Loop by code point so that MATHEMATICAL BOLD CAPITAL A (two chars) is tested as one character.

Java
public class CharacterIsAlphabeticCodePoints {
    public static void main(String[] args) {
        String s = "X\u2161\uD835\uDC00!";
        int alphabetic = 0;
        int codePoints = 0;
        for (int i = 0; i < s.length(); ) {
            int cp = s.codePointAt(i);
            codePoints++;
            if (Character.isAlphabetic(cp)) {
                alphabetic++;
            }
            i += Character.charCount(cp);
        }
        System.out.println("chars=" + s.length() + " codePoints=" + codePoints + " alphabetic=" + alphabetic);
    }
}

How It Works

  1. Five chars, four characters. X, ROMAN NUMERAL TWO (U+2161), the surrogate pair for U+1D400, and the exclamation mark.
  2. Advance by charCount. The loop has no update in its header; i += Character.charCount(cp) moves 2 positions after the bold A and 1 position otherwise.
  3. Three alphabetic. X and the bold A are letters, the Roman numeral is a letter number, and only ! is rejected.

Frequently Asked Questions

Java 7. On Java 6 and older the method does not exist; isLetter is the closest alternative.
It was added after Java 5 introduced code point support, so only the int version was provided. Passing a char still compiles because char widens to int.
Yes. Everything isLetter accepts, isAlphabetic accepts too. The reverse is not true.
Yes. The Roman numeral characters starting at U+2160 have the category LETTER_NUMBER, which isAlphabetic accepts and isLetter rejects.
Usually not. Combining accents such as U+0301 are not alphabetic, but many vowel signs in Indic scripts are, because they carry the Other_Alphabetic property.

Next: isBmpCodePoint()

Check whether a code point fits in a single char (U+0000 to U+FFFF, Java 7+).

isBmpCodePoint() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

15 people found this page helpful