Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #27103
| Date | 2013-12-28 16:36 -0500 |
|---|---|
| From | Arne Vajhøj <arne@vajhoej.dk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: literals and keywords |
| References | (1 earlier) <l9n026$7to$1@dont-email.me> <keywords-20131228181648@ram.dialup.fu-berlin.de> <l9n6tq$fsh$1@dont-email.me> <52bf2c49$0$304$14726298@news.sunsite.dk> <l9nd1t$jhs$1@dont-email.me> |
| Message-ID | <52bf446c$0$301$14726298@news.sunsite.dk> (permalink) |
| Organization | SunSITE.dk - Supporting Open source |
On 12/28/2013 3:41 PM, markspace wrote: > On 12/28/2013 11:53 AM, Arne Vajhøj wrote: > >> And new is an operator. > > Is it? That section I linked to refers to "new" as a keyword. > > <http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.9> > > Five paragraphs after that link. > > "...the type arguments to the constructor immediately follow the keyword > _new_." > > And a couple of other places too. Operators that are words and not special characters are also keywords. But a quick check reveals that you are absolutely right - JLS do not call new an operator even though it does call instanceof an operator. That surprises me. In C++ and C# new is considered an operator. And I do not seem to be the only one surprised. The Java tutorial actually call it an operator. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: literals and keywords markspace <markspace@nospam.nospam> - 2013-12-28 08:59 -0800
Re: literals and keywords "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-12-28 17:28 +0000
Re: literals and keywords markspace <markspace@nospam.nospam> - 2013-12-28 10:56 -0800
Re: literals and keywords Arne Vajhøj <arne@vajhoej.dk> - 2013-12-28 14:53 -0500
Re: literals and keywords markspace <markspace@nospam.nospam> - 2013-12-28 12:41 -0800
Re: literals and keywords Arne Vajhøj <arne@vajhoej.dk> - 2013-12-28 16:36 -0500
csiph-web