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