Scala Int +(x: String) method with example Last Updated : 02 Nov, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The +(x: String) method is utilized to return the sum of the specified int value and string value. Method Definition: (Int_Value).+(String_Value) Return Type: It returns the sum of the specified int value and string value. Example #1: Scala // Scala program of Int +(x: String) // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying Int +(x: String) function val result = (100).+("GFG") // Displays output println(result) } } Output: 100GFG Example #2: Scala // Scala program of Int +(x: String) // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying Int +(x: String) function val result = (110).+("GEEKS") // Displays output println(result) } } Output: 110GEEKS Comment More infoAdvertise with us Next Article Scala Float +(x: String) method with example K Kanchan_Ray Follow Improve Article Tags : Scala Scala Scala-Method Similar Reads Scala Float +(x: String) method with example The +(x: String) method is utilized to return the sum of the specified float value and string value. Here the String gets added at the end of the specified float value. Method Definition: (Float_Value).+(String_Value) Return Type: It returns the sum of the specified float value and string value. Exa 1 min read Scala Short +(x: Int) method with example The +(x: Int) method is utilized to find the sum of the stated Short value and 'x' of type Int. Method Definition: def +(x: Int): Int Return Type: It returns Int. Example: 1# Scala // Scala program of +(x: Int) // method // Creating object object GfG { // Main method def main(args:Array[String]) { / 1 min read Scala Int +(x: Short) method with example The +(x: Short) method is utilized to return the sum of the specified int value and short value. Method Definition: (Int_Value).+(Short_Value) Return Type: It returns the sum of the specified int value and short value. Example #1: Scala // Scala program of Int +(x: Short) // method // Creating objec 1 min read Scala - String Methods with Examples In Scala, as in Java, a string is a sequence of characters. In Scala, objects of String are immutable which means a constant and cannot be changed once created. In the rest of this section, we discuss the important methods of java.lang.String class. char charAt(int index): This method is used to ret 12 min read Scala Double +(x: String) Method With Examples The +(x: String) method is used to find the sum of the specified double and the given âxâ type of string in the argument. Syntax: def +(x: String): Double Returns: It return the sum of the specified double and the given string type âxâ. Example 1: Scala // Scala program of +(x: String) // method // 1 min read Scala Int +(x: Int) method with example The +(x: Int) method is utilized to return the sum of the specified first int value and second int value. Method Definition: (Int_Value).+(Int_Value)Return Type: It returns the sum of the specified first int value and second int value. Example #1: Scala // Scala program of Int +(x: Int) // method // 1 min read Like