The java.lang.Character.isISOControl() is an inbuilt method in java which determines if the specified character is an ISO control character or not. A character is considered to be an ISO control character if its code is in the range ‘\u0000’ through ‘\u001F’ or in the range ‘\u007F’ through ‘\u009F’. This method cannot handle supplementary characters. In order to support all the Unicode characters, including supplementary characters, the parameter can be on int datatype in the above method.
public static boolean isISOControl(data_type ch)
Parameters: The function accepts a single parameter ch which is mandatory. It specifies the character to be tested. The parameter can be of char or int datatype.
Return value: The function returns a boolean value. The boolean value is true if the character is an ISO control character or false otherwise.
Below programs illustrate the above method:
- is not an ISO control character is an ISO control character
143 is an ISO control character 291 is not an ISO control character
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.