Languages
[Edit]
EN

Java - list of all reserved keywords

2 points
Created by:
JustMike
3515

1. Java reserved keywords introduction.

Java has set of keywords that are words reserved for Java compilar, and can't be used for naming purpose during coding like naming class, method or variable.
For example if we use one of the keyword as variable name we will get compilation error.

2. Java reserved keywords list presented in table.

abstract assert boolean break
byte case catch char
class const continue default
do double else enum
extends final finally float
for goto if implements
import instanceof int interface
long native new package
private protected public return
short static strictfp super
switch synchronized this throw
throws transient try void
volatile while true false
null      

 

ture, false and null are not reserved words, but we can't use them for naming purposes.

 

Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.