|
Is Space
The following example shows how to use Character.isSpaceChar() API.
|
package com.bethecoder.tutorials.core.character;
public class CharIsSpace {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println(Character.isSpaceChar(' '));
System.out.println(Character.isSpaceChar('\n'));
System.out.println(Character.isSpaceChar('\t'));
System.out.println(Character.isSpaceChar('A'));
}
}
|
| |
It gives the following output,
true
false
false
false
|
|