Predefined Methods Class Character - Java Sample Program

class Character (Package: java.lang)

Example:

isLowerCase(ch)
ch is of type char. Returns true, if ch is a lowercase
letter; false otherwise.
Example:
isLowerCase('a') returns the value true
isLowerCase('A') returns the value false

isUpperCase(ch)
ch is of type char. Returns true, if ch is an uppercase
letter; false otherwise.
Example:
isUpperCase('B') returns the value true
isUpperCase('k') returns the value false

toLowerCase(ch)
ch is of type char. Returns the character that is the
lowercase equivalent of ch. If ch does not have the
corresponding lowercase letter, it returns ch.
Example:
toLowerCase('D') returns the value d
toLowerCase('*') returns the value *

toUpperCase(ch)
ch is of type char. Returns the character that is the
uppercase equivalent of ch. If ch does not have the
corresponding uppercase letter, it returns ch.
Example:
toUpperCase('j') returns the value J
toUpperCase('8') returns the value 8

No comments: