1. Home
  2. Computing & Technology
  3. Java
photo of Paul Leahy
Paul's Java Blog

By Paul Leahy, About.com Guide to Java

Some Words are Reserved in Java

Monday June 16, 2008

All programming languages need to have a set of words that are interpreted as commands by the compiler. Java is no different. It has about fifty words that you cannot use when naming a variable, method, class, etc. The reason they can’t be used is they are already spoken for by the Java syntax.

Looking through the list of reserved words will help you avoid confusing the Java compiler. Anytime you use a reserved word in the wrong place, the compiler will get grumpy and complain it was expecting something else completely!

Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss
Community Forum
Explore Java
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Java

©2009 About.com, a part of The New York Times Company.

All rights reserved.