Java Character(char value) Constructor

Syntax

Character(char value) constructor from Character has the following syntax.

public Character(char value)

Example

In the following code shows how to use Character.Character(char value) constructor.


public class Main {
//w w  w  . j  a v a  2  s .  c  om
  public static void main(String args[]) {

    Character c = new Character('c');

    System.out.println(c);
  }
}           
     

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