logo

Java ToUpperCase() Method


Show

The process revisits the uppercase figure of the individual char value. The java string to UpperCase() process returns the thread in the uppercase letter. In other words, it adapts all characters of the string into upper case letters. The toUpperCase() method works same as toUpperCase(Locale. getDefault()) method.

Syntax

boolean toUpperCase(char ch)

Parameters

Here is the detail of parameters −

  • ch − Primitive character type.

Return Value

  • This method returns the uppercase form of the specified char value.

Example

public class Test {

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

This will produce the following result:

Output

C
C

Here at Intellinuts, we have created a complete Java tutorial for Beginners to get started in Java.