This documentation is archived and is not being maintained.

Character.toUpperCase Method

Visual Studio 2005

Converts a char to the uppercase.

Package: java.lang

Assembly: vjslib (in vjslib.dll)


public static char toUpperCase(
    char ch);

Parameters

ch

The char to be converted.

The uppercase char, if it was lowercase; the same char otherwise.

// c-toUpper1.jsl
// Character.toUpperCase example

public class MyClass
{
    public static void main(String[] args)
    {
        char c1 = Character.toUpperCase('A');
        char c2 = Character.toUpperCase('a');
        System.out.println(c1);
        System.out.println(c2);
    }
}

/*
Output:
A
A
*/
Show: