Java - toUpperCase() Method
Advertisements
Description
The method returns the uppercase form of the specified char value.
Syntax
char 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
Live Demopublic 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
java_characters.htm
Advertisements