Is a function kind of like a static method?

Posted by lkm on Stack Overflow See other posts from Stack Overflow or by lkm
Published on 2010-05-07T02:53:18Z Indexed on 2010/05/07 2:58 UTC
Read the original article Hit count: 230

I'm a java programmer and am trying to understand the difference between a method (java methods) and a function (such as in c++). I used to think that they are the same, just different naming conventions for different programming languages. But now that I know they are not, I am having trouble understanding the difference.

I know that a method relates to an instance of a class and has access to class data (member variables), while a function does not (?). So is a function kind of like a static method?

See here for explanations I read which led me to think this.

© Stack Overflow or respective owner

Related posts about programming-languages

Related posts about methods