If you want to change selection, open document below and click on "Move attachment"
Next Steps in Scala n write "Console println 10".
Scala doesn't technically have operator overloading, because it doesn't actually have operators
in the traditional sense. Instead, characters such as +, -, *, and / can
be used in method names. Thus, <span>when you typed 1 + 2 into the Scala interpreter in Step 1, you were actually
invoking a method named + on the Int object 1, passing in 2 as a
parameter. As illustrated in Figure 3.1, you could alternatively
have written 1 + 2 using traditional method invocation syntax, (1).+(2).
Figure 3.1 - All operations are method calls in Scala.
Another important idea illustrated by this example will give you insight into why arrays are accessed with parentheses
in Scala
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.