Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #20642

Re: Designation of a non-static method

Newsgroups comp.lang.java.programmer
Date 2012-12-20 12:31 -0800
References <nextDouble-20121220200056@ram.dialup.fu-berlin.de>
Message-ID <52fccac6-d78f-4958-a0dc-a9cc37ea3ada@googlegroups.com> (permalink)
Subject Re: Designation of a non-static method
From Lew <lewbloch@gmail.com>

Show all headers | View raw


Stefan Ram wrote:
> I used to think that it was common usage to use »C.f()« for
>   a static method »f()« and »C#f()« for a non-static method
>   »f()« of a class »C«.

AFAIK it still is.

>   Yet, in
> http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html
>   , there is a reference »Random.nextDouble()« given
>   (at the end of the expanded documentation of »random()«),
>   that refers to the non-static method
> http://docs.oracle.com/javase/7/docs/api/java/util/Random.html#nextDouble()
> 
>   . So is this now the official Java style to designate
>   even a non-static method »f()« of a class C by »C.f()«?

No.

Was it ever the official style to do it the common way?

I have not seen the "#/." convention universally employed, although I have observed 
that it is common, particularly among more experienced and competent Java developers.

I have never seen it proffered as an official standard. Could you point to a reference 
that it is or ever was?

-- 
Lew

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

Re: Designation of a non-static method Lew <lewbloch@gmail.com> - 2012-12-20 12:31 -0800

csiph-web