Java Character.highSurrogate(int codePoint)

Syntax

Character.highSurrogate(int codePoint) has the following syntax.

public static char highSurrogate(int codePoint)

Example

In the following code shows how to use Character.highSurrogate(int codePoint) method.


public class Main {
/*w w w. j  a  v a2  s .  c om*/
   public static void main(String[] args) {
      int cp1 = 0x008f, cp2 = 0x0123;

      System.out.println( Character.highSurrogate(cp1) );
      System.out.println( Character.highSurrogate(cp2) );
   }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable