Open In App

Scala Char toLower() method with example

Last Updated : 11 Nov, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

The toLower() method is utilized find the lowercase of the stated character value.

Method Definition: def toLower: Char

Return Type: It returns Char.

Example: 1#




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


Output:

a

Example: 2#




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


Output:

z


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads