Method - Functions
Similar syntax to c++
- <modifiers> <return_type> <name> ( <args> ) <block>
- modifiers : public, private, protected, static, final
- return_type : any type and void for nothing
- name : Identifier - Method’s name
- args : Argument list
-
Examples :
- public int getSize();
- private byte[] getBuffer();
- public void printNumbers( int[] theArray )