Methods in Java

Methods are collection of statements that are grouped together to perform an operation.

Some Common Methods
Java language contains some built in methods. They will be executed when we call them. For example when we call .reverse() it has a code like this below.

Examples for how to use methods in Java

Methods Overloading 

Methods overloading means that have same method name but different parameters.

Here when we call the method it will be executed according to the parameters. i.e., the method will be called according to the parameters we given.


Post a Comment

0 Comments