Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SCALA

scala default parameter skip one

There's no way to skip the parameters, but you can use named parameters when you call your foo method, for example:

// Call foo with b = 5, c = 7 and the default value for a
foo(b = 5, c = 7)
edit - You asked specifically how to do this by positional assignment: this is not possible in Scala.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #scala #default #parameter #skip
ADD COMMENT
Topic
Name
7+2 =