A method is a block of code inside a class that runs when called.
static int add(int a, int b) { return a + b; }voidmeans the method returns nothing.- Overloading: several methods with the same name but different parameters.
- Recursion: a method that calls itself, with a stopping condition.