• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

whois the final word on keywords

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been looking at different lists for Java's keywords and there seems to be no consensus. The JLS I looked for in yahoo gives me 1.1 version sites. So does Sun's serach for Java Language Specs. After the objectives page mess up, I just wanted to confirm which is the final and last JLS for J2 and pls may I have the address?? I presume the JLS would be the final word on the reserved words/keywords subject. Right??
 
Nalini Mistry
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just been to the ergnosis.com site which maintains an unofficial update on Java and there I read that Sun has confirmed that widefp and strictfp are two new keywords added to Java 2 but this isnt showing on the JLS. Any help at all on this matter is appreciated
this is what they say
Issue: New keywords widefp and strictfp
Section: 3.9 Keywords
Status: CONFIRMED
Version 1.2 of the Java language adds two new keywords, widefp and strictfp, to allow floating-point calculations to use IEEE 754 extended-precision formats. These keywords are documented in a Sun paper, Proposal for Extension of Java Floating-Point in JDK 1.2. The change breaks programs that use widefp or strictfp as identifiers.
See the document Changes in JDK 1.2 Software for an overview of the changes to the language and virtual machine introduced by the new support for extended-precision formats.

and in that document I cannot seem to find anything
[This message has been edited by Nalini Mistry (edited April 27, 2000).]
 
Nalini Mistry
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just tried compiling a prg with strictfp and widefp as identifiers and yes strictfp doesnt seem to work.
with this line :
double strictfp;
the compiler complains that it is an illegal expression/statement and expects a ; after the double
double widefp;
or String widefp;
compile fine
the java version i have is classic vm(Java 1.2.1-A)
So if widefp is supposed to be added to the keywords list and my version doesnt complain about it, should i mark it as a reserved word if i do get it for the exam??
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
strictfp is used for classs and methods
try this.
<pre>

strictfp class Test {
strictfp static class StaticInnerclass {}
strictfp class Innerclass {}
strictfp static void m1() {}
strictfp void m2() {
}

</pre>
regds
maha anna
[This message has been edited by maha anna (edited April 27, 2000).]
 
Nalini Mistry
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx MA. i guess this isnt on the exam and so isnt mentioned in any of the exam oriented books(brogden,rhe)
Question still remains, what should i do if i get strictfp or widefp in a mark the keywords qs. Are they keywords or arent they for the exam??
[This message has been edited by Nalini Mistry (edited April 29, 2000).]
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nalini,
strictfp is a VALID keyword.
widefp is NOT A VALID keyword.
For your final reference you have to refer to this page.
regds
maha anna
[This message has been edited by maha anna (edited April 29, 2000).]
 
Nalini Mistry
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey that keywords page is really useful. Thanx MA !!!

BTW how did my profile change from greenhorn to ranch hand??
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nalini,
Here in this forum , if you post more than a certain no. of posts you are promoted from 'greenhorn' to 'ranchHand'. The min. no of posts is 30 I think. Ans all your previous messages will show up now with 'ranchHand'. Congrats.
regds
maha anna
reply
    Bookmark Topic Watch Topic
  • New Topic