java tutorial - Method Character.toUpperCase() - java programming - learn java - java basics - java for beginners



Description

Method Character.toUpperCase() — The Character.toUpperCase () method - in Java, returns the specified char value in uppercase (uppercase).

Syntax

char toUpperCase(char ch)
click below button to copy the code. By - java tutorial - team

Options

Detailed information about the parameters:

  • ch is a primitive character type (char).

Return value

  • In Java, Character.toUpperCase () returns the specified value in uppercase.

Sample Code

public class Test{

   public static void main(String args[]){
      System.out.println("Value \"a\" in uppercase: " + Character.toUpperCase('a'));
      System.out.println("Value \"V\" in uppercase: " + Character.toUpperCase('V'));
      System.out.println("Value \"1\" in uppercase: " + Character.toUpperCase('1'));
      System.out.println("Value \"#\" in uppercase: " + Character.toUpperCase('#'));
   }
}
click below button to copy the code. By - java tutorial - team

Output

Value "a" in uppercase: A
Value "V" in uppercase: V
Value "1" in uppercase: 1
Value "#" in uppercase: #

Related Searches to Method Character.toUpperCase()