Are "method" and "function" synonyms?
These are a different level classifications:
A method is a function (or procedure) associated with object &ndash; a concept from Object Oriented Programming.

A function is the logical unit (a piece of reusable code called by name) independent of any objects (those might not even exist in particular language). So the method is a function, but a function exists also in non-OO languages, so the reverse is not true.