Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38639
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What is a "primary expression"? |
| Date | 2018-10-07 18:02 +0000 |
| Organization | albasani.net |
| Message-ID | <ppdho5$7hc$1@news.albasani.net> (permalink) |
| References | <primary-20181007171511@ram.dialup.fu-berlin.de> |
On Sun, 07 Oct 2018 16:24:09 +0000, Stefan Ram wrote:
> What is a "primary expression"?
>
This seems to be a fairly clear definition from
http://web.deu.edu.tr/doc/oreily/java/langref/ch04_js.htm
Primary expressions are constructs that fetch or create values, but
do not directly perform computations on them
So, I think that this is also a primary expression:
public float almostPi() { return 22.0/7.0 }
At least, some other languages than Java think would accept it as one,
and possibly would accept this too:
r.nextDouble();
where R was declared as: Random r = new Random();
Both my examples match the definition I quoted.
--
Martin | martin at
Gregorie | gregorie dot org
Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread
Re: What is a "primary expression"? Martin Gregorie <martin@mydomain.invalid> - 2018-10-07 18:02 +0000
csiph-web