Online Java Compiler By
JavaTpoint.com
public class JavaCharactergetDirectionality_Example1 { public static void main(String[] args) { // Initialize the codePoints. int codepoint1 = 36; int codepoint2 = 2001; // Convert the codePoint to its numeric value. byte value1 = Character.getDirectionality(codepoint1); byte value2 = Character.getDirectionality(codepoint2); // Print the result. System.out.println("codePoint: " + codepoint1); System.out.println("Unicode directionality property for the first codePoint is: "+ value1); System.out.println("codePoint: " + codepoint1); System.out.println("Unicode directionality property for the second codePoint is: " + value2); } }
Output