Character Class Flashcards
Java Character Class
PURPOSE:
Character class is one of the 8 wrapper classes that represents char primitive data type
Java has Character class and provides many useful methods that allows us to perform some tasks on char
It is stored in java.lang package
Mostly used Character class methods are isLetter(), isDigit(), isLetterOrDigit(), isWhitespace(), isUpperCase(), isLowerCase()
isLetter(char)
PURPOSE:
this method takes a char as argument and returns a boolean. It determines whether the specified char value is a letter
isDigit(char)
PURPOSE:
this method takes a char as argument and returns a boolean. It determines whether the specified char value is a digit
isLetterOrDigit(char)
PURPOSE:
this method takes a char as argument and returns a boolean. It determines whether the specified char value is a letter or a digit
isWhitespace(char)
PURPOSE:
this method takes a char as argument and returns a boolean. It determines whether the specified char value is a white space
isLowerCase(char)
PURPOSE:
this method takes a char as argument and returns a boolean. It determines whether the specified char value is a lowercase letter