logo

Java String ToUpperCase() Method


Show

Description

This process has two alternates. The first deviation converts entire of the value in this String to upper case utilizing the rules of the provided Locale. This is alike to calling toUpperCase(Locale.getDefault()).The following modification takes conditions as an argument to be used whereas converting into upper case.

Syntax

Here is the syntax of this method:

public String toUpperCase()

Parameters

Here is the detail of parameters:

  • NA

Return Value

  • It returns the String, converted to uppercase.

Example

import java.io.*;
public class Test {

   public static void main(String args[]) {
      String Str = new String("Welcome to Intellinuts.com");

      System.out.print("Return Value :" );
      System.out.println(Str.toUpperCase() );
   }
}

This will produce the following result:

Output

Return Value :WELCOME TO INTELLINUTS.COM