Online Java Compiler By
JavaTpoint.com
public class JavaCharacterisDefined_Example2 { public static void main(String[] args) { // Create int primitives. int codePoint1; int codePoint2; int codePoint3; int codePoint4; int codePoint6; // Assign the values to the primitives. codePoint1 = 121; codePoint2 = 685; codePoint3 = 67; codePoint4 = 00; // Create their boolean primitives. boolean b1; boolean b2; boolean b3; boolean b4; b1 = Character.isDefined(codePoint1); b2 = Character.isDefined(codePoint2); b3 = Character.isDefined(codePoint3); b4 = Character.isDefined(codePoint4); String str1 = "The meaning for the first codepoint in the Unicode is given as: " + b1; String str2 = "The meaning for the second codepoint in the Unicode is given as: " + b2; String str3 = "The meaning for the third codepoint in the Unicode is given as: " + b3; String str4 = "The meaning for the fourth codepoint in the Unicode is given as: " + b4; // Print the values. System.out.println( str1 ); System.out.println( str2 ); System.out.println( str3 ); System.out.println( str4 ); } }
Output