9 Method definition

  • In Scala methods are defined using def
  • Methods that return a value must have an equal sign before the body of the method
  • Methods that have either a return statement or are recursive must declare a return type

Code editor is using Scalakata.com written by Guillaume Massé