• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

keyword

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
one mock exam says that strictfp is a keyword and so as "java 2 exam cram" book. but when i use it , it compiles perfectly ?
what should be the answer ?
thanks & regards
amit
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dua,
u can check keywords on Officially Java site which is give below. http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
hope this help.
Aftab

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


but when i use it , it compiles perfectly ?
what should be the answer ?


Hi amit,
I didn't get what you mean by saying the above statements.
Whether you use as a keyword or a identifier.
The best would be to write a program and give it to javac.exe.
The keywords are the special words that are not to be used as identifiers in any program.
I wrote a code to test your question and my compiler(jdk1.2) barked.
CODE
------
<pre>

public class KeywordDemo
{
public static void main(String a[])
{
int strictfp = 1;
}
}

</pre>
So it means that "strictfp" is a keyword.
Hope this helps.

------------------
Regards
---------
vadiraj

*****************
There's a lot of I in J.
*****************
[This message has been edited by vadiraj vd (edited January 05, 2001).]
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
strictfp is a keyword but only for Java 2.
follow the above link.
hence if you have jdk 1.2/1.3 installed int strictfp; should not compile
K Singh
 
It's a tiny ad. At least, that's what she said.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic