method signature :
1 2 3 | returnType methodName(Parameters){ //do the stuff } |
example :
1 2 3 | int sum(int n){ // do the stuff } |
type of method:
1. instance method2. noninstance method
3. abstract method
based on access--
1. accessor method(getter)
2. mutator method(setter)
In summary :
1 2 3 4 5 6 | //method name = sum //method signature = sum(int n) //method interface = int sum(int n) int sum(int n){ //..................... } |
No comments:
Post a Comment