Character Class Flashcards

1
Q

Java Character Class

PURPOSE:

A

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()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

isLetter(char)

PURPOSE:

A

this method takes a char as argument and returns a boolean. It determines whether the specified char value is a letter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

isDigit(char)

PURPOSE:

A

this method takes a char as argument and returns a boolean. It determines whether the specified char value is a digit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

isLetterOrDigit(char)

PURPOSE:

A

this method takes a char as argument and returns a boolean. It determines whether the specified char value is a letter or a digit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

isWhitespace(char)

PURPOSE:

A

this method takes a char as argument and returns a boolean. It determines whether the specified char value is a white space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

isLowerCase(char)

PURPOSE:

A

this method takes a char as argument and returns a boolean. It determines whether the specified char value is a lowercase letter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly