java.lang.Character.toCodePoint(char high, char low)


java.lang.Character.toCodePoint(char high, char low)

package com.codingdict;



import java.lang.*;



public class CharacterDemo {



   public static void main(String[] args) {



      // create 2 char primitives ch1, ch2

      char ch1, ch2;



      // assign values to ch1, ch2

      ch1 = '\ud800';

      ch2 = '\udc00';



      // create an int primitive cp

      int cp;



      // assign code point value of surrogate pair ch1, ch2 to cp

      cp = Character.toCodePoint(ch1, ch2);



      String str = "Supplementary code point value is " + cp;



      // print cp value

      System.out.println( str );

   }

}