>>>>>>> alexandre_pater...@yahoo.fr wrote:
>>>>>>>> I really want to know how a Java program can obtain
[quoted text clipped - 24 lines]
>
> But why are static methods a requirement for the OP?
Perhaps the OP's "They're not static methods apparently" was merely a
passing remark to the effect that Mark's
"java.lang.Runtime.freeMemory();" had the superficial appearance of a
static method whereas it is really an instance method.
Perhaps if Mark had written "Runtime.getRuntime().freeMemory()" the OP
wouldn't have commented? I must admit I often use the
Classname.methodname() shorthand to refer to instance methods, so I'm
not criticizing Mark, just hypothesising about the OP's remark.
Daniele Futtorovic - 08 Feb 2008 11:11 GMT
> Perhaps the OP's "They're not static methods apparently" was merely a
> passing remark to the effect that Mark's
[quoted text clipped - 5 lines]
> Classname.methodname() shorthand to refer to instance methods, so I'm
> not criticizing Mark, just hypothesising about the OP's remark.
I usually use a number sign (#) prefix to denote instance members and a
dot prefix to denote class members. IIRC, I picked up that habit from
the Javadoc engine, which would interpret this notation that way.
Wouldn't this be a viable alternative?
Lew - 08 Feb 2008 15:32 GMT
Lew wrote:
>>>> I still want to know why the fact that the methods aren't static is
>>>> a problem. Why is that?
> Perhaps the OP's "They're not static methods apparently" was merely a
> passing remark to the effect that Mark's
[quoted text clipped - 5 lines]
> Classname.methodname() shorthand to refer to instance methods, so I'm
> not criticizing Mark, just hypothesising about the OP's remark.
Mark shouldn't be criticized - referring to the method from the class, as I
pointed out upthread, is a standard way to communicate about the Javadocs.
Since instances are meaningless in the context of documentation, it would be
improper to infer that a static method is intended.

Signature
Lew