Java Character isSpaceChar() MethodThe isSpaceChar(char ch) method of Character class determines whether the given(or specified) character is a Unicode space character. The given(or specified) character is considered to be a space character if the character is specified as a space character by the Unicode Standard. The above method returns true if the general category of the character is one of the following:
SyntaxParameterch: It is the character that needs to be tested. Return ValueThe isSpaceChar(char ch) method returns a Boolean value, i.e., true if the given(or specified) character is a space character. Otherwise, the method returns false. Example 1Output: The first character is a space character: true The second character is a space character: true The second character is a space character: true Example 2Output: The first character is a space character: false The first character is a space character: false Example 3Output: Enter the first input:_ The character '_' is not a space character. Enter the second input:} The character '}' is a space character. Enter the third input:* The character '*' is not a space character. Next TopicJava-character-isvalidcodepoint-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India