Java/J2EE and SOA (348 Blogs) Become a Certified Professional
AWS Global Infrastructure

Programming & Frameworks

Topics Covered
  • C Programming and Data Structures (16 Blogs)
  • Comprehensive Java Course (4 Blogs)
  • Java/J2EE and SOA (345 Blogs)
  • Spring Framework (8 Blogs)

What are Java Keywords and reserved words?

Last updated on Jun 17,2021 12.3K Views

Aayushi Johari
A technophile with a passion for unraveling the intricate tapestry of the... A technophile with a passion for unraveling the intricate tapestry of the tech world. I've spent over a decade exploring the fascinating world of...
4 / 72 Blog from Java Core Concepts

Keywords are predefined which have a unique meaning and functionality in Java programming language. These keywords are also known as reserved keywords which mean they cannot be used as a variable name, class, method or any other identifier. There are 57 reserved keywords in Java. Meanwhile, in this huge list of java keywords, there are some which are not used anymore and few versions do not support a tiny number of keywords.

Let’s dig deeper and understand these Java keywords in-depth.

Keywords in JavaDescription


A class that is declared with abstract keyword, is known as abstract class in java. It can have abstract and non-abstract methods (method with body).


It is is allowed only inside a loop body. When continue executes, the current iteration of the loop body terminates, and execution continues with the next iteration of the loop.


For is used  for looping. It involves initialization, a boolean expression, and incrementation/decrementation. It supports repeated execution of a statement or block of statements that is controlled by an iterable expression.


used to create an instance of a class, or an object.


Used as a statement which executes when it matches to a specific case.


Assert keyword is added in 1.4 version. It describes a predicate (true-false statement), to let developers think that it’s always true. If an assertion is false at run-time, it causes execution to abort.


Used in a switch statement to execute a block of code in the loop.


goto has no function and it is no more supported in Java programming.


package is a mechanism of grouping similar type of classes, interfaces, and sub-classes collectively based on functionality.


Synchronized blocks in Java are marked with the Synchronized keyword. This block in Java is synchronized on some object. All blocks that are synchronized on the same object can only have one thread executing inside them at a time.


boolean can hold true or false value only.


It is used in control statements. The Java do-while loop is used to iterate a set of statements until the given condition is satisfied.


If statement is used to test an expression and execute certain statements accordingly. It is also used to create an if-else statement in java.


Private is an access modifier in java, where the methods or data members that are declared as private are only accessible within the class in which they are declared.


this keyword in Java represents the current instance of a class. It is mainly used to access other members of the same class.


The break statement is allowed only inside a loop body. When break executes, the loop terminates.


It declares a variable that can hold 64-bit double floating-point numbers.


used by a class to implements an interface.


The methods or data members that are declared as private are only accessible within the class in which they are declared.


used to create and throw an exception.


It is used to declare a field which can hold 8-bit data values.


It is used to implement a condition alternate to if condition.


Used in the beginning which refers to other classes


Classes, methods or data members which are declared as public are accessible anywhere throughout the program. There is no restriction on the scope of public data members.


Used in method declarations which specifies exceptions that can’t be handled within the method.


used in the switch statements which can be labeled with one or more case


Enum is added in 5.0 version.


It evaluates to true if and only if the runtime type of the object is compatible with the class or interface.


Used to finish the execution of a method. It returns the value required by the method.


It declares an instance field which is not a part of the default serialized form of an object.


Statements in the catch block specify the exceptions generated by try block.


Merely indicates that a class has extended its immediate class.


A data type that holds 32 bit signed integer.


A data type that holds a 16-bit integer.


It tests a block of code for exceptions.


It is a data type that can hold a 16-bit unsigned integer.


Once a certain entity is defined, it cannot be changed nor derived from later.


Interface in Java refers to the abstract data types. They allow Java collections to be manipulated independently from the details of their representation.


static keyword is mainly used for memory management. It can be used with variables, methods, blocks and nested classes


It returns a null value for a method.


It creates a new class in Java which is a blueprint from which an object is created.


It specifies that a block of code under exception handling always gets executed.


Data type holding a 64 bit integer.


strictfp keyword is added in 1.2 version.


Specifies or indicates that a variable might change asynchronously.


This const java keyword is no more used.


A data type holding a 32-bit floating point number.


It specifies that a method declaration has tobe done from platform-specific(native) code.


super keyword refers to the members such as variable,method and constructor of of immediate super class.


It is used to create while loop.The Java while loop is used to iterate a part of the program again and again. If the number of iteration is not fixed, then you can use while loop.

With this, we come to the end of this “java keywords” article. I hope you found it informative. If you wish to learn more, you can check out our other  Java Blogs as well.

Now that you have understood basics of Java, check out the Java Certification Course by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. Edureka’s Java J2EE and SOA training and certification course is designed for students and professionals who want to be a Java Developer. The course is designed to give you a head start into Java programming and train you for both core and advanced Java concepts along with various Java frameworks like Hibernate & Spring.

Got a question for us? Please mention it in the comments section of this “Java keywords” blog and we will get back to you as soon as possible.

Upcoming Batches For Java Course Online
Course NameDateDetails
Java Course Online

Class Starts on 15th June,2024

15th June

SAT&SUN (Weekend Batch)
View Details
Java Course Online

Class Starts on 28th September,2024

28th September

SAT&SUN (Weekend Batch)
View Details

Join the discussion

Browse Categories

webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

What are Java Keywords and reserved words?