What is method in java ?

It contains the executable body that can be applied to the specific object of the class.
Method includes method name, parameters or arguments and return type and a body of executable code.
Syntax : type methodName(Argument List){
}
ex : public float add(int a, int b, int c)
methods can have multiple arguments. Separate with commas when we have multiple arguments


Posted

in

Tags:

Comments

Leave a Reply