Online Java Compiler By
JavaTpoint.com
public class JavaCharactergetDirectionality_Example2 { public static void main(String[] args) { // Create two int primitives cp1, cp2 int obj1, obj2; // Assign the values to obj1, obj2 obj1 = 323; obj2 = 60; // create two byte primitives b1, b2 byte b1, b2; // assign directionality of cp1, cp2 to b1, b2 b1 = Character.getDirectionality(obj1); b2 = Character.getDirectionality(obj2); System.err.println("Directionality for first codePoint is " + b1); System.err.println("Directionality of second codePoint is " + b2); } }
Output