Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

keywords and reserve words

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if the difference between keyword and reserve word.
is goto a keyword or a reserve word?
who can help me?
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per My interpritation
keywords & reserved words are those which we can's use
as Identifers even though they pass all rules for being Identifier.
Keywords are part of language with specific meaning.
Reserved words are not part of language i.e they have no meaning
but still can't be used as identifiers
Correct me if i am wrong
Thanx
Mohit

 
rainbow
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so goto,const is reserve words but not keywords.
am I right?
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rainbow:
so goto,const is reserve words but not keywords.
am I right?


only null, true, false r reserve words not key words.
I think because they are just value.
 
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 ...
const and goto are keywords even though they are not used in Java.
true and false are boolean literals. null is a null literal.
None of them can be used as identifiers.
see JLS �3.9
Hope that helps.
[This message has been edited by Jane Griscti (edited September 13, 2000).]
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all;
goto, const are reserved keywords and same
is true false, null
navodit
 
rainbow
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all:
Quote from JLS:
{b]The keywords const and goto are reserved, even though they are not currently used. While true and false might appear to be keywords, they are technically Boolean literals .Similarly, while null might appear to be a keyword, it is technically the null literal .[/b]
I think Sun shouldn't test the difference between keywords and reserve words.
Rainbow
 
rainbow
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry,I mistaked the UBB code.let me try it again.
hi all:
Quote from JLS:
The keywords const and goto are reserved, even though they are not currently used. While true and false might appear to be keywords, they are technically Boolean literals .Similarly, while null might appear to be a keyword, it is technically the null literal .
I think Sun shouldn't test the difference between keywords and reserve words.
Rainbow
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic