Java Character.charValue()

Syntax

Character.charValue() has the following syntax.

public char charValue()

Example

In the following code shows how to use Character.charValue() method.


public class Main{
  public static void main(String[] argv){
    System.out.println(new Character('a').charValue());    
  }/*from w  w w.  ja  v a 2  s . c  om*/
}

The output:





















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