Scala Int toHexString() method with example Last Updated : 30 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The toHexString() method is utilized to return the hexa decimal form of the specified integer value. Method Definition: def toHexString: String Return Type: It returns the Hexa decimal form of the specified integer value. Example #1: Scala // Scala program of Int toHexString() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toHexString() method val result = (5).toHexString // Displays output println(result) } } Output: 5 Example #2: Scala // Scala program of Int toHexString() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying toHexString() method val result = (18).toHexString // Displays output println(result) } } Output: 12 Comment More infoAdvertise with us Next Article Scala Map toString() method with example K Kanchan_Ray Follow Improve Article Tags : Scala Scala Scala-Method Similar Reads 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 Int toOctalString() method with example The toOctalString() method is utilized to return the octal form of the specified integer value. Method Definition: def toOctalString: String Return Type: It returns the octal form of the specified integer value. Example #1: Scala // Scala program of Int toOctalString() // method // Creating object o 1 min read Scala Map toString() method with example The toString() method is utilized to display a string from the Scala map. Method Definition: def toString(): String Return Type: It returns a string from the stated map. Example #1: Scala // Scala program of toString() // method // Creating object object GfG { // Main method def main(args:Array[Stri 1 min read Scala Float toString() method with example The toString() method is utilized to convert the specified number into string data type value. Method Definition: (Number).toString Return Type: It returns the converted String datatype value. Example #1: Scala // Scala program of Float toString() // method // Creating object object GfG { // Main me 1 min read Scala Int toInt() method with example 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( 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