In Java, a reserved term is used as a code key called a keyword. Because they are predefined, these terms cannot be used for anything else. They cannot serve as a name for a variable, an object, or any other type of identifier. In Java, there are 51 reserved phrases or keywords.
Java Reserved Keywords List
|signifies that the class or method that comes after this keyword is abstract and must be implemented by a subclass.
|Declaring assertions or assumptions in a program is made easier by the assert keyword. If an assertion is true, the program continues normally; if not, an AssertionError is raised at runtime, and the program terminates.
|defines true and false as the two Boolean values 0 and 1.
|used to escape loops or iterative structures.
|capable of storing 8-bit data as a data type.
|marks sentences (cases) within a Switch statement.
|used to handle exceptions thrown by the try block.
|Unsigned 16-bit Unicode characters can be stored in this data format.
|utilized to introduce a new class.
|It is beneficial to assume control outside of the loop and move on to the following iteration.
|Describes the "block of code" that will automatically run in a Switch statement.
|The "do-while" loop's initial keyword.
|64-bit number-holding data type (floating-point).
|The "if" statements, defines the else component.
|a Java declaration for enumerations.
|suggests inheritance. From another class, a class can be descended or inherited.
|creates a method or variable with fixed values that cannot be changed.
|Specifies the finally block, which is what happens after the try-catch block, whether or not the exception was caught.
|capable of storing 32-bit floating-point numbers.
|shows that a "for" loop has begun.
|begins the "if" sentence.
|shows whether a class complies with an interface.
|used to add more packages or classes to the program or to reference them.
|a tool for determining whether an object is an instance of the specified class.
|Contains a 32-bit integer value in a data type.
|used when announcing an interface.
|64-bit integer values are stored in a data type.
|utilized to denote native code (platform-specific).
|Operator for producing new objects.
|represents a null reference.
|Java package declaration keyword.
|A variable or method can only be accessed by the class in which it is declared when it is marked with the private access specified sign.
|A protected access specifier is indicated by this term. When a variable or method is protected, only the class in which it is defined, its subclass, and other classes in the same package are permitted to access that variable or method.
|Public access specifiers are denoted by the keyword public. An application can access a variable, method, class, or interface that has been marked public.
|The calling method receives the value of a method via return. Additionally, it's utilized to give the calling method back control.
|16-bit integer number values are stored in a data type.
|When a method or variable is marked as static, it means it cannot be instantiated.
|When calculating floating point values, the keyword strictfp limits the precision and rounding. Portability is ensured.
|the class's base or superclass is indicated.
|Identifies a switch statement that evaluates a condition and runs different cases based on the test result.
|Identifies synchronized code blocks for multithreaded programs, such as important portions.
|The word "this" designates the active object.
|as a throwable exception.
|This shows the exception that a method is capable of throwing.
|specifies a temporary variable that is not a component of an object's persistent state.
|Aim for keywords to start a block that contains potentially exception-raising code.
|No return value is indicated.
|used to specify variables not kept in the main memory. They are modifiable asynchronously.
|A while loop is started by the word while.
|Java no longer supports the "const" keyword.
|Java no longer supports the 'goto' keyword.
|True, false, and null
|True, false, and null are literals. Nevertheless, they are ineffective as program identifiers.