Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Can you spot the erroneous function definition among the following?
Home
Scala Constructs
Can you spot the erroneous function definition among the following?
asked
Sep 11, 2022
in
Scala Constructs
by
sharadyadav1986
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}
scala
function
code
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Sep 11, 2022
by
sharadyadav1986
d) def functionName(x:Int,y:Int)={x+y}
...