Scala Int toInt() method with example Last Updated : 23 Feb, 2021 Comments Improve Suggest changes Like Article Like Report The toInt() method is utilized to convert the specified int number into float int type value. Method Definition: (Number).toIntReturn Type: It returns the converted int datatype value. Example 1: Scala // Scala program of Int toInt() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toInt method val result = (1).toInt // Displays output println(result) } } Output: 1 Example 2: Scala // Scala program of Int toInt() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toInt method val result = (12).toInt // Displays output println(result) } } Output: 12 Comment More infoAdvertise with us Next Article Scala Int toLong() method with example K Kanchan_Ray Follow Improve Article Tags : Scala Scala Scala-Method Similar Reads Scala Int toLong() method with example The toLong() method is utilized to convert the specified int number into float long type value. Method Definition: (Number).toLong Return Type: It returns the converted long datatype value. Example #1: Scala // Scala program of Int toLong() // method // Creating object object GfG { // Main method de 1 min read Scala Int toString() method with example The toString() method is utilized to return the string representation of the specified value. Method Definition: def toString(): String Return Type: It returns the string representation of the specified value. Example #1: Scala // Scala program of Int toString() // method // Creating object object G 1 min read Scala Float toInt() method with example The toInt() method is utilized to convert the specified number into integer value. Method Definition: (Number).toInt Return Type: It returns the converted integer value. Example #1: Scala // Scala program of Float toInt() // method // Creating object object GfG { // Main method def main(args:Array[S 1 min read Scala Int toShort() method with example The toShort() method is utilized to convert the specified int number into a short type value. Method Definition: (Number).toShortReturn Type: It returns the converted short datatype value. Example 1: Scala // Scala program of Int toShort() // method // Creating object object GfG { // Main method def 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 Int toChar() method with example The toChar() method is utilized to convert the specified int number into char type value. Method Definition: (Number).toChar Return Type: It returns the converted char datatype value. Example #1: Scala // Scala program of Int toChar() // method // Creating object object GfG { // Main method def main 1 min read Like