Java Character.toUpperCase(int codePoint)

Syntax

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

public static int toUpperCase(int codePoint)

Example

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


public class Main {
//w  w  w .  ja v  a 2  s.  c om
  public static void main(String[] args) {
    int cp1 = 0x0071; 
    int cp2 = 0x0570; 

    int cp3 = Character.toUpperCase(cp1);
    int cp4 = Character.toUpperCase(cp2);

    String str1 = "Uppercase equivalent of " + cp1 + " is " + cp3;
    String str2 = "Uppercase equivalent of " + cp2 + " is " + cp4;

    System.out.println(str1);
    System.out.println(str2);
  }
}

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