The Character.isTitleCase(char ch) java method determines if the specified character is a titlecase character. A character is a titlecase character if its general category type, provided by Character.getType(ch), is TITLECASE_LETTER.
Some characters look like pairs of Latin letters. For example, there is an uppercase letter that looks like “LJ” and has a corresponding lowercase letter that looks like “lj”. A third form, which looks like “Lj”, is the appropriate form to use when rendering a word in lowercase with initial capitals, as for a book title.
These are some of the Unicode characters for which this method returns true:
- LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
- LATIN CAPITAL LETTER L WITH SMALL LETTER J
- LATIN CAPITAL LETTER N WITH SMALL LETTER J
- LATIN CAPITAL LETTER D WITH SMALL LETTER Z
Many other Unicode characters are titlecase too.
This method cannot handle supplementary characters. To support all Unicode characters, including supplementary characters, use the isTitleCase(int) method.
The isTitleCase(char ch) method of Character class is static thus it should be accessed statically which means the we would be calling this method in this format:
Non static method is usually called by just declaring method_name(argument) however in this case since the method is static, it should be called by appending the class name as suffix. We will be encountering a compilation problem if we call the java isTitleCase() method non statically.