Appendix C. Keywords and Reserved Words

Figure C.1. Java keywords
Java Keywords
abstractassertbooleanbreakbyte
casecatchcharclasscontinue
defaultdodoubleelseenum
extendsfinalfinallyfloatfor
ifimplementsimportinstanceofint
interfacelongnativenewpackage
privateprotectedpublicreturnshort
staticstrictfpsuperswitchsynchronized
thisthrowthrowstransienttry
voidvolatilewhile  
Keywords that are not currently used
constgoto   

Java also contains the reserved words true and false, which are boolean literals, and null, which is the literal that represents a reference to nothing. Like keywords, these reserved words cannot be used as identifiers.

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.