• 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

simple question-please help

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are goto and const are keywords which are reserved?
or they are just reserved words?
and one more thing abt strictfp which is newly added in java2.So if we are asked to state the number of keywords shpuld we include goto,const and strictfp or not?
2)Select all valid java Keywords.
1)superclass
2)goto
3)open
4)close
5)integer
6)goto, import
7) superclass, open, close
ans 2,6.from www.javaquestions.homepage.com please clarify
------------------
"Winners don't do different things
They do things differently"
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You got me confused over this man.
But I suppose and think that goto and const are reserved words, which are keywords too...Better check JLS also.
and one more thing abt strictfp which is newly added in java2.So if we are asked to state the number of keywords shpuld we include goto,const and strictfp or not?
Strictfp is keyword.No doubt over that.
So the answer in jexam wd say only strictfp..

2)Select all valid java Keywords.
1)superclass--Nope
2)goto --yep
3)open--nope
4)close ---nope
5)integer ---nope
6)goto, import --yep
7) superclass, open, close --nope

 
atin sehgal
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Refer this link for more ...
More abt Keywords/Reserved words
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friend
what you should know is that you are going to give the exam for SCPJ2 that stands for "Sun Certified Progammer for Java2".
Which means that you should know all the happenings in Java2 VERSION of Sun Co.

Golu
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
It's very unlikely you'll be asked 'how many keywords are there' much more likely to see a list of words and asked to select those which are (or are not) keywords.
'goto' and 'const' are keywords
JLS §3.9
<quote>
"The keywords const and goto are reserved, even though they are not currently used. This may allow a Java compiler to
produce better error messages if these C++ keywords incorrectly appear in programs.
While true and false might appear to be keywords, they are technically Boolean literals (�3.10.3). Similarly, while null
might appear to be a keyword, it is technically the null literal (�3.10.7). "

</quote>
When in doubt, always check the JLS
Jane
 
Dinner will be steamed monkey heads with a side of tiny ads.
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