Java Methods
A method is a function. A method name can be any name and identifying the return type is maditory.
Ex:
1. public int max(){}
↑
access modifier is not manditory.
2. void area(int length){}
It's just like functions in C language.
Ex:
1. public int max(){}
↑
access modifier is not manditory.
2. void area(int length){}
It's just like functions in C language.
Comments
Post a Comment