Scala Function Calls - chrisbitm/python GitHub Wiki

A Function Call is the process of invoking or executing a defined function within another Function.

Example

def helloWorld(): String = {
    return "Hello World";
}

def main(args: Array[String]): Unit = {
  var greet = helloWorld();
  print(greet)
}
  • String = is a Return Type. This can be any Datatype.
  • return "Hello World" is a Return Statement that will Return the String Hello World when called into main
  • var greet = helloWorld(); calls the Function and stores it into the Expression greet