Online Scala Compiler
										
										

object MyClass {
    def add(x:Int, y:Int) = x + y;

    def main(args: Array[String]) {
        print("sum of x + y = " + add(35,20));
    }
}
                                
                                

Output Results

										
sum of x + y = 55
warning: 1 deprecation (since 2.13.0); re-run with -deprecation for details