Easy Tutorial
❮ Arrays Equal Net Address ❯

Java toUpperCase() Method

Java Character Class


The toUpperCase() method is used to convert a lowercase character to uppercase.

Syntax

char toUpperCase(char ch)

Parameters

Return Value

Returns the uppercase form of the character, if any; otherwise, returns the character itself.

Example

public class Test {

    public static void main(String args[]) {
        System.out.println(Character.toUpperCase('a'));
        System.out.println(Character.toUpperCase('A'));
    }
}

The output of the above program is:

A
A

Java Character Class

❮ Arrays Equal Net Address ❯