Scala Byte toFloat() method Last Updated : 30 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In Scala, Byte is a 8-bit signed integer (equivalent to Java’s byte primitive type). The toFloat() method is utilized to convert the specified number into Float datatype value. Method Definition: (Number).toFloat Return Type: It returns converted Float value. Example #1: Scala // Scala program of Byte toFloat() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toFloat method val result = (13).toFloat // Displays output println(result) } } Output: 13.0 Example #2: Scala // Scala program of Byte toFloat() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toFloat method val result = (123).toFloat // Displays output println(result) } } Output: 123.0 Comment More infoAdvertise with us Next Article Scala Byte toInt() method S Shivam_k Follow Improve Article Tags : Scala Scala Scala-Method Scala-byte Similar Reads Scala Byte toShort() method 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 By 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 Short toFloat() method Short, a 16-bit signed integer (equivalent to Javaâs short primitive type) is a subtype of scala.AnyVal. The toFloat() method is utilized to convert the specified number into Float datatype value. Method Definition: (Number).toFloat Return Type: It returns converted Float value. Example #1: Scala // 1 min read Scala Int toFloat() method with example The toFloat() method is utilized to convert the specified int number into float data type value. Method Definition: (Number).toFloat Return Type: It returns the converted float datatype value. Example #1: Scala // Scala program of Int toFloat() // method // Creating object object GfG { // Main metho 1 min read Scala Char toFloat() method with example The toFloat() method is utilized to convert a stated character into float or its ASCII value of type float. Method Definition: def toFloat: Float Return Type: It returns Float or ASCII value of the corresponding letter of type float. Example: 1# Scala // Scala program of toFloat() // method // Creat 1 min read Scala Float toFloat() method with example The toFloat() method is utilized to converted the specified number into float value. Method Definition: (Number).toFloat Return Type: It returns the converted float value. Example #1: Scala // Scala program of Float toFloat() // method // Creating object object GfG { // Main method def main(args:Arr 1 min read Like