Groovy – toUpperCase()

  • Post author:
  • Post category:Groovy
  • Post comments:1 Comment
upper case

Converts all of the characters in this String to upper case.

Syntax

String toUpperCase()

Parameters

None

Return Value

The modified string in upper case.

Example

Following is an example of the usage of this method −

class Example { 
   static void main(String[] args) { 
      String a = "HelloWorld"; 
      println(a.toUpperCase()); 
   } 
}

When we run the above program, we will get the following result −

HELLOWORLD

Previous Page:-Click Here

This Post Has One Comment

Leave a Reply