DIFFERENCE BETWEEN FUNCTION AND METHOD IN JAVA PART . 3
If a function is defined with in a class then it becomes as method. And without class it is called as function.
If a function is defined with in a class then it becomes as method. And without class it is called as function.