A method is on an object.
A function is independent of an object.
For Java, there are only methods.
For C, there are only functions.
For C++ it would depend on whether or not you're in a class.
【总结】
function是函数,所以也是数学里的函数
method是方法,可以这样说,调用某个对象的某个方法