Hi everyone, today we are going to focus on Methods in java.If you ask yourself why we use it, I can say something about that.To show you what I mean,

1.Methods can be used for clarifying code.

2.It helps us to simplify and design coding.

As you see above picture, method contains modifiers,return data type,name,parameters and body.

In method header, If you use (int,long,double,String) value type, you have to return the same type value from method. On the other hand, you prefer to use (void) data type, you dont need to return it. As for the method name, It is…

Utku Tasguluk

Addicted Java

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store