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

X-Received by 10.224.184.11 with SMTP id ci11mr5200028qab.1.1356035485149; Thu, 20 Dec 2012 12:31:25 -0800 (PST)
Received by 10.49.12.97 with SMTP id x1mr1584735qeb.25.1356035485125; Thu, 20 Dec 2012 12:31:25 -0800 (PST)
Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!209.85.216.87.MISMATCH!ee4no1255208qab.0!news-out.google.com!k2ni865qap.0!nntp.google.com!ee4no1301608qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Thu, 20 Dec 2012 12:31:24 -0800 (PST)
In-Reply-To <nextDouble-20121220200056@ram.dialup.fu-berlin.de>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
NNTP-Posting-Host 69.28.149.29
References <nextDouble-20121220200056@ram.dialup.fu-berlin.de>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <52fccac6-d78f-4958-a0dc-a9cc37ea3ada@googlegroups.com> (permalink)
Subject Re: Designation of a non-static method
From Lew <lewbloch@gmail.com>
Injection-Date Thu, 20 Dec 2012 20:31:25 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.java.programmer:20642

Show key headers only | 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