Scala Byte toShort() method Last Updated : 30 Jan, 2020 Comments Improve Suggest changes Like Article Like Report In Scala, Byte is a 8-bit signed integer (equivalent to Java’s byte primitive type). The toShort() method is utilized to convert the specified number into Short datatype value. Method Definition: (Number).toShort Return Type: It returns converted Short value. Example #1: Scala // Scala program of Byte toShort() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toShort method val result = (13).toShort // Displays output println(result) } } Output: 13 Example #2: Scala // Scala program of Byte toShort() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toShort method val result = (123.4).toShort // Displays output println(result) } } Output: 123 Comment More infoAdvertise with us Next Article Scala Byte toShort() method S Shivam_k Follow Improve Article Tags : Python Scala Scala Scala-Method Scala-byte +1 More Practice Tags : python Similar Reads Scala Byte toChar() method In Scala, Byte is a 8-bit signed integer (equivalent to Javaâs byte primitive type). The toChar() method is utilized to convert the specified number into Char datatype value. Method Definition: (Number).toChar Return Type: It returns converted Char value. Example #1: Scala // Scala program of Byte t 1 min read Scala Byte toInt() method In Scala, Byte is a 8-bit signed integer (equivalent to Javaâs byte primitive type). The toInt() method is utilized to convert the specified number into Int datatype value. Method Definition: (Number).toInt Return Type: It returns converted Int value. Example #1: Scala // Scala program of Byte toInt 1 min read Scala Double /(x: Short) method In Scala, Double is a 64-bit floating point number, which is equivalent to Javaâs double primitive type. The /(x: Short) method is utilized to return the quotient of this value and given value x. Method Definition - def /(x: Short): Double Returns - Returns the quotient of this value and x. Example 1 min read Scala Double ==(x: Short) method In Scala, Double is a 64-bit floating point number, which is equivalent to Javaâs double primitive type. The ==(x: Short) method is utilized to return true if this value is equal to x, false otherwise. Method Definition - def ==(x: Short): Boolean Returns - Returns true if this value is equal to x, 1 min read Scala Double *(x: Short) method In Scala, Double is a 64-bit floating point number, which is equivalent to Javaâs double primitive type. The *(x: Short) method is utilized to return the product of the specified Double value and Short value. Method Definition - def *(x: Short) Returns - Returns the product of this value and x. Exam 1 min read Like