Header javaperspective.com
JavaPerspective.com  >   Beginner Tutorials  >   3. Java Basics  >   3.1. The Java keywords

3.1. The Java keywords
Last updated: 27 January 2013.

The Java language has a list of reserved keywords that can't be used as identifiers in Java programs. An identifier is a unique name that you give to an element within a program, such as a field or method. Some of the Java keywords are rarely used and others are very common. Here is the list:

abstractcontinuefornewswitch
assertdefaultgotopackagesynchronized
booleandoifprivate this
breakdoubleimplementsprotectedthrow
byteelse import publicthrows
caseenuminstanceofreturntransient
catchextendsintshorttry
charfinalinterfacestaticvoid
classfinallylongstrictfpvolatile
constfloatnativesuperwhile

Additionally, there are 3 reserved literals that can't be used as identifiers: true, false and null. Most of the keywords listed here will be discussed the first time they appear in the code examples of the tutorials to come. For now, just bear in mind that the Java keywords and reserved literals can't be used as identifiers.

The next tutorial lists all the primitive types of the Java language.


You are here :  JavaPerspective.com  >   Beginner Tutorials  >   3. Java Basics  >   3.1. The Java keywords
Next tutorial :  JavaPerspective.com  >   Beginner Tutorials  >   3. Java Basics  >   3.2. The Java primitive types

Copyright © 2013. JavaPerspective.com. All rights reserved.  ( Terms | Contact | About ) 
Java is a trademark of Oracle Corporation
Image 1 Image 2 Image 3 Image 4 Image 5 Image 6 Image 7