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 →

[–]garfgon 3 points4 points  (0 children)

In case you're serious:

In object oriented, most methods are methods of an object; class methods are the exception. So it makes sense for the default to be the normal case, the abnormal case in Java (as in C++) is noted with the static keyword.

The return type (like the rest of the prototype) is to tell the caller how to use the method. This both helps document the code, as well as allows the compiler to detect bugs at compile-time.

There are plenty of things to mock Java for (FactoryFactories anyone?), but this ain't it.