Character class functions :
1) Character.isLowerCase() – This function is used to check whether the
given character is in small letter or not. Return type Boolean.
Ex. System.out.print(Charcater.isLowerCase(‘P’)); output : false.
2) Character.isUpperCase() – This function is used to check whether the
given character is in capital letter or not. Return type Boolean.
Ex. System.out.print(Charcater.isUpperCase(‘P’)); output : true.
3) Character.isLetter() – This function is used to check whether the given
character is an alphabet or not. Return type Boolean.
Ex. System.out.print(Charcater.isLetter(‘P’)); output : true.
4) Character.isDigit() – This function is used to check whether the given
character is a no or not. Return type Boolean.
Ex. System.out.print(Charcater.isDigit(‘9’)); output : true.
5) Character.isLetterOrDigit() – This function is used to check whether the
given character is an alphabet or a number or none of these. Return type
Boolean.
Ex. System.out.print(Charcater.isLetterOrDigit(‘P’)); output : true.
6) Character.isWhitespace() – This function is used to check whether the
given character is a space or not. Return type Boolean.
Ex. System.out.print(Charcater.isWhitespace(‘ ’)); output : true.
7) Character.toLowerCase() - This function is used to convert any upper case
letter to lower case. Return type character.
Ex. System.out.print(Charcater.toLowerCase(‘P’)); output : p.
8) Character.toUpperCase() - This function is used to convert any lower case
letter to upper case. Return type character.
Ex. System.out.print(Charcater.toUpperCase(‘x’)); output : X.
How to create character class object :
Character ob = new Character(‘p’);
Default value of character data type : ‘\u0000’