The java.lang.Character.isSpaceChar(char ch) is an inbuilt method in java which determines if the specified character is a Unicode space character. A character is considered to be a space character if and only if it is specified to be a space character by the Unicode Standard.
This method returns true if the character’s general category type is any of the following ?
public static boolean isSpaceChar(char ch)
Parameter: The function accepts one mandatory parameter ch which specifies the character to be tested.
Return Value: This method returns a boolean value. The value is True if the character is a space character, False otherwise.
Below programs illustrate the Character.isSpaceChar() method:
c1 is a space character? false c2 is a space character? false
c1 is a space character? false c2 is a space character? true
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.