Scala Char toShort() method with example Last Updated : 29 Oct, 2019 Improve Improve Like Article Like Save Share Report The toShort() method is utilized to convert a stated character into type Short. Method Definition: def toShort: Short Return Type: It returns Short. Example: 1# // Scala program of toShort() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toShort method val result = '\u5555'.toLong // Displays output println(result) } } Output: 21845 Example: 2# // Scala program of toShort() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toShort method val result = '\u1111'.toShort // Displays output println(result) } } Output: 4369 Like Article Suggest improvement Next Scala Char -(x: Short) method with example Share your thoughts in the comments Add Your Comment Please Login to comment...