Java

=Methods= A method is a task that an object of a class performs. A method is a piece of code that can execute something. It can be build first to represent certain commands. The main method is like the ground level so other methods can be executed in the main method. There are also standard methods already in Java like the print method.

Create a method
public void nameMethod{} Example: public void startEngine { System.out.println("Starting the car!"); System.out.println("Vroom!"); }
 * public means that other classes can access this method.
 * The void keyword means that there is no specific output from the method. So the first two words describe the method.
 * Within the curly brackets the commands that the method will be able to perform are written.

Call a method
To call a method you can use: class.method;

print line
System.out.println; This will print out anything that is between the brackets. It can take variables and text and you can combine multiple things to print with the + sign. If you want to print a text it should be between "".