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

reserved words

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Exam Cram says byvalue,future,inner,rest,cast,generic,operator,
var are some of the reserved words not currently in use other than const and goto.
But i didnt get any compiler error when i used it in my program(i got error when i used const and goto..) Why is this?
 
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Chitra
List of reserved keywords:
JLS 3.9 Keywords

Jamal Hasanov
www.j-think.com
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chitra, those "extra" words were once being considered for inclusion in the Java 1 language spec, but they were dropped. Some authors who had gotten an advanced copy of the spec included them, and after they were dropped from the official spec, their books were out-of-date.
goto and const are still reserved words. They just aren't implemented in the current java spec. They are reserved mainly for the benefit of C++ programmers and those porting old C++ code to java.
Use the link Jamal gave you as the current correct version of the Java reserved words.
[ May 25, 2002: Message edited by: Rob Ross ]
 
Chitra Jay
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot guys
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why assert isn�t in teh keywords list? it is valid in java 1.4...
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is assert? I have seen it many places in the discussion of beta 1.4
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An assertion, in brief terms allows you to test an assumption in your program. If that assumption fails, your program fails to let you know.
Check out this.
Corey
 
Swati Gupta
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot.I am planning to appear in Exam in June. I think I should not worry about it now. But I will read it once I am done with exam.
 
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic