Name

java.lang.Character

Synopsis

This class is a smaller counterpart to the J2SE Character class. It provides an object wrapper around a single char primitive data type. The class contains several static methods for testing the type of character stored, as well as for converting between uppercase and lowercase letters. Use the static digit() method to convert the character to a decimal value, using the specified radix (e.g., radix 8 for octal). To dump the stored character back into a primitive char data type, use the charValue() method.

public final classCharacter {
   // constants
   public static final int MIN_RADIX;
   public static final int MAX_RADIX;
   public static final char MIN_VALUE;
   public static final char MAX_VALUE;

   // static methods
   public static int digit(char ch, int radix);
   public static boolean isDigit(char ch);
   public static boolean isLowerCase(char ch);
   public static boolean isUpperCase(char ch);
   public static char toLowerCase(char ch);
   public static char toUpperCase(char ch);

   // public constructor
   public Character(char value);

   // public instance methods
   public char charValue();
   public boolean equals(Object obj);
   public int hashCode();
   public String toString();

}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.