Loading lesson path
Java
Java Methods focused on Java Methods and related concepts.
A method is a block of code which only runs when it is called.
Information can be passed to methods as a parameter. Parameters act as variables inside the method.
In the earlier lesson , we used the void keyword in all examples (like static void myMethod(int x) ), which indicates that the method should not return a value.
With method overloading , multiple methods can have the same name with different parameters:
In Java, variables are only accessible inside the region where they are created. This is called scope .
Recursion is the technique of making a function call itself. This technique provides a way to break complicated problems down into simpler problems which are easier to solve.