Scala Tutorials
- Basic Scala Tutorial
About
Tweet
11
Method definition 3
Curly braces are optional on single line method bodies.
//Curly braces are optional on single line blocks def add(x:Int, y:Int) = x + y println(add(42,13))
Theme
Monokai
Solarized Dark
Eclipse
Code editor is using
Scalakata.com
written by
Guillaume Massé
TOC
◀ Prev
Next ▶
×
Table of Contents