Why is isJavaLetterOrDigit deprecated?

Why is the method isJavaLetterOrDigitto java.lang.Characterbecome obsolete?

The docs say you should use the method instead isJavaIdentifierPart, but not indicate why. The documentation for the two methods is otherwise identical. No explanation could be found on this.

In fact, a search for the source code shows that currently one simply calls the other, so there is no difference in behavior. Was it just obsolete because it had a more confusing name? This seems like a rather weird solution.

@Deprecated
public static boolean isJavaLetterOrDigit(char ch) {
    return isJavaIdentifierPart(ch);
}
+5
source share
2 answers

() , ; , , . , "" . , , () .

( , @HuiZheng, , , . Java API API. , Oracle , . Java Enterprise - !)

, () API, . , .

+5

1:

API ( ). isJavaLetterOrDigit . , isLetterOrDigit .

2:

API . isJavaLetterOrDigit , , "_" "$".

3:

API . isJavaIdentifierPart API, isJavaIdentifierStart, isUnicodeIdentifierPart, isIdentifierIgnorable.

, , API, , . API . , API , (, ,) .

+5

All Articles