Methods[JAVA]

1. Method

A method is a block of code that performs a specific task and can be called whenever required.

2. Method Definition

A method definition is the declaration and implementation of a method, including its name, return type, parameters, and body.

3. Method Invocation / Method Call

A method invocation is the statement used to execute a method by calling its name, along with required arguments.

4. static

static is a keyword that indicates that a method or variable belongs to the class rather than to an individual object.

5. Return Type

The return type specifies the type of value that a method returns to the calling method.

6. void

void is a return type that specifies that a method does not return any value to the calling method.

7. return statement

The return statement terminates a method and, when applicable, sends a value back to the calling method.

8. Parameter

A parameter is a variable declared in a method's parameter list that receives a value when the method is called.

9. Argument

An argument is the actual value passed to a method when the method is called.

10. Method Overloading

Method overloading is the process of defining multiple methods with the same name but different parameter lists in the same class.

11. Recursion

Recursion is a technique in which a method calls itself repeatedly until a specified condition is satisfied.

12. main() method

The main() method is the entry point of a Java application from which program execution begins.