A method is a block of code that is only executed when called upon. Parameters can be used and passed into the methods to further utilize their use. These methods can only be known as functions and is helpful because once you create a method, it acts as a block of code you can call upon over and over again without remaking it.
Void methods are methods that performs an action or operation, they are not capable of returning a value which are Strings, ints or even doubles.
The image above shows how to create a void method. In the image you can see you can add a optional parameter, This is a parameter you can use in your action. For example. you can add a String parameter, and use that parameter to print that same String in a quote.
Non-void methods are methods that return a value, but only of ONE data type. In the method itself you can specify what type of value you want to return. It can be used to perform a calculation and operation with that data type. You can't mix two data types together in the method itself.
The image above shows how to create a void method. In the image you can see you can add a optional parameter, This is a parameter you can use in your action. For example. you can add 2 int parameters, and use that parameter to add the two ints together. You can then return the sum of it.
The Math class is a class that contains many cool methods that will perform mathematical operations/tasks on numbers, like data types that are ints or doubles.
The method analyzes the two numbers/parameters (a & b) and finds out which one is higher.
The method analyzes the two numbers/parameters (a & b) and finds out which one is lower.
The method returns the square root of the parameter/number (a).
The method returns an absolute value of an number, which is a number's distance from 0. It will always be a positive number.
This method returns a random number between 0.0 and 1.0. There are ways to manipulate this method like multiplying it by 101, which NOW returns a number 0-100.