Answer Posted / Pradeep Kumar Dixit
The basic syntax for a function declaration in Scala is def functionName(parameters): returnType = { /*function body*/ }. For example, def addNumbers(x: Int, y: Int) : Int = x + y.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers