Scala Char toLower() method with example
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) } } |
chevron_right
filter_none
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) } } |
chevron_right
filter_none
Output:
z