Scala / Scala interview questions
What is the rule for Scala named arguments?
The order of named arguments can be rearranged. However, if some arguments are named and others are not, the unnamed arguments must come first and in the order of their parameters in the method signature.
def printDetails(first: String, last: String): Unit = { println(first + " " + last) } printDetails("John",last = "Doe")
More Related questions...