Java Icon Methods

Methods in Java are important, they are pre programmed blocks that can be called in other methods. Methods can be a void type method meaing that it does not return anything and it just executes whatever is inside it. You also have int, string, and boolean methods. These methods need a return (methodTypeVariable); For example, lets say you are making a calculator and you need to make a multiplication method. That method would look something like this:
public int multiply(int num1, int num2){
int result = num1*num2
return result;
}

This method, when called, will ask for two numbers, as parameters, and multiply them, then it will return them. You could then say something like System.out.println(multiply(5,2)); This will print 10.
Here are some examples of methods: method Methods are usefull and we are going to be using them in the future