Scala Char abs() method with example Last Updated : 03 Nov, 2019 Improve Improve Like Article Like Save Share Report The abs() method is utilized to find the absolute value of the stated character. Method Definition: def abs: Char Return Type: It returns Char. Example: 1# // Scala program of abs() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying abs() method val result = 'a'.abs // Displays output println(result) } } Output: a Example: 2# // Scala program of abs() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying abs() method val result = 'B'.abs // Displays output println(result) } } Output: B Like Article Suggest improvement Next Scala Char asDigit() method with example Share your thoughts in the comments Add Your Comment Please Login to comment...