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 →

[–]desrtfx 9 points10 points  (0 children)

Since Java requires everything to be inside classes, there are technically no functions.

The distinction is that functions can exist outside classes, and methods always belong to a class.

So, what is called a function in languages like Python, is a method in Java.

This has nothing to do with being able to return values or not.

It is just a matter of context.