Well there is a little difference between a method and a function.
A function is just a code that you can call anytime by its name and you can pass arguments also known as parameters to it and you can also get the result from any function i.e. return value of the function.
But a method is a code that is called by its name but it is associated to any object. You can pass parameters to methods also and you can also get some return value from methods but thing is they will always be associated with some objects.
EDITED
Java is object oriented, you cannot have Java code to run without classes in most cases however in C++ you can get your code run without classes. So in Java there will be classes and code will be written in classes so they are called methods instead of functions, as they will be associated with objects.
But in C++ you can have some function that can be called by passing values explicitly.
In simple terms you can say, a method is a function that is related to an object.