• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Keywords  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference b/w reserved word and keyword?
Ex:
Which two are reserved words in Java?
a)run
b)default
c)implement
d)import
 
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
default , import are keywords
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this for a complete list http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
Once you start coding a bit you get to learn(and remember) them all.
And, keywords are ALWAYS lower case.
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question there about the difference between keywords and reserved words.
I understand that all keywords are reserved, and therefore can't be used as names. But there is also the addition of true, false and null, which are reserved words and not keywords. Why are those three not considered keywords?
 
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are values that something can be and do not cause the compiler to create or behave a particular way while the keywords are compiler "instructions".
 
Elisabeth Van
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
Ranch Hand
Posts: 782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!