Some Words are Reserved in Java
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!


No comments yet. Leave a Comment