0 votes
in Scala Constructs by
Can you spot the erroneous function definition among the following?

a) def functionName(x:Int,y:Int):Int=x+y

b) def functionName(x:Int,y:Int):Int={return x+y}

c) def functionName(x:Int,y:Int):Int{x+y} ()

d) def functionName(x:Int,y:Int)={x+y}

1 Answer

0 votes
by

d) def functionName(x:Int,y:Int)={x+y}

Related questions

0 votes
asked Sep 11, 2022 in Scala Constructs by sharadyadav1986
0 votes
asked Aug 22, 2022 in Python by Robindeniel
...