January 2018
Intermediate to advanced
115 pages
1h 37m
English
Methods are reusable code blocks that only execute when called.
You can create a method by typing void followed by the method’s name, a set of parentheses, and a code block. The void keyword means the method won’t return a value. The naming convention for methods is the same as for variables—a descriptive name with the first word in lowercase and the first letter of any subsequent words capitalized:
The preceding method will simply print out a text message. To invoke (call) it ...