Skip to content
Related Articles

Related Articles

Scala Char toUpper() method with example
  • Last Updated : 11 Nov, 2019

The toUpper() method is utilized find the uppercase of the stated character value.

Method Definition: def toUpper: Char

Return Type: It returns Char.

Example: 1#

filter_none

edit
close

play_arrow

link
brightness_4
code

// Scala program of toUpper()
// method
  
// Creating object
object GfG
  
    // Main method
    def main(args:Array[String])
    {
        // Applying toUpper() method 
        val result = 'a'.toUpper
          
        // Displays output
        println(result)
      
    }

chevron_right


Output:

A

Example: 2#

filter_none

edit
close

play_arrow

link
brightness_4
code

// Scala program of toUpper()
// method
// Creating object
object GfG
  
    // Main method
    def main(args:Array[String])
    {
        // Applying toUpper() method
        val result = 'b'.toUpper
          
        // Displays output
        println(result)
      
    }

chevron_right


Output:

B



My Personal Notes arrow_drop_up
Recommended Articles
Page :