Methods in Java Session 22
Methods in Java Session 22
METHODS
A group of statements, set of logic which we can reuse for
multiple times is called method.
If any logic is reusable for multiple times, we are identifying
that logic and make it as method or function. Here after
whenever we require that logic, instead of writing that
logic again and again simply we are calling the methods.
1. Static method
2. Non-static method
Static Method
Note:
Methods we can create with arguments are either static
or non static methods. Only the way we are calling is
different from Static to Non Static.