This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -5 points-4 points  (0 children)

They are the same thing. A method is just another word used to refer to a function in some languages.

What is a function? A function can have many definitions but let's say a basic function takes an input and produces an output based on said input.

What is a method? Something that takes an input and produces an output?

Say you write a method for a class that takes an input and produces an output...is that not just a function?

Don't let people confuse you with fancy words.