Online Java Compiler By
JavaTpoint.com
public class JavaCharacterisIdentifierIgnorableExample4 { public static void main(String[] args) { // Create three char primitives char1, char2 and char3. char char1, char2, char3; // Assign the values to char1, char2 and char3. char1 = '1'; char2 = '2'; char3 = '3'; // Create three boolean primitives b1, b2 and b3. boolean b1, b2, b3; // Assign isIdentifierIgnorable results of char1, ch2 and ch3 to b1, b2 and b3 respectively. b1 = Character.isIdentifierIgnorable(char1); b2 = Character.isIdentifierIgnorable(char2); b3 = Character.isIdentifierIgnorable(char3); String str1 = "The first character '1' is an ignorable control character : " + b1; String str2 = "The second character '2' is an ignorable control character : " + b2; String str3 = "The third character '3' is an ignorable control character : " + b3; // Print the values of b1, b2 and b3. System.out.println( str1 ); System.out.println( str2 ); System.out.println( str3 ); } }
Output