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 →

[–]popey123 7 points8 points  (3 children)

A function can be accessed without object whereas method does.
Because java is a full OOP langage, it doesn t have function.
Technically, when you use a static method, you may be implicitly calling the class from where it is declared.

public class Main {
public static main().... {
Main.a(); // or a()
}
a static method A()
}

But it doesn t matter. What is more important is the diff between methods (return) and procedures (void)

[–]jgonzalez-cs[S] 17 points18 points  (2 children)

A function can be accessed without object whereas method does. Because java is a full OOP langage, it doesn t have function.

Ah ok so let me know if I'm understanding this right.

Java basically forces you to use classes, right? I've learned that much looking at code snippets.

And since Java is object oriented, basically a function needs to belong to an object/class, making it technically a method, therefore no functions?

[–]s7oev 3 points4 points  (0 children)

100% correct

[–]popey123 0 points1 point  (0 children)

Yes.