There are certain keywords or reserved words in Java that have a specific meaning to the system compiler. These cannot be used as variable names. Below you will find a list of them for reference:
int: datatype that holds integers only and has 32 bit memory.
short: datatype that holds integers only but has 16 bit memory.
long: datatype that holds integers only but has 64 bit memory.
double: datatype that holds decimal number only and has 64 bit memory.
float: datatype that holds decimal number only and has 32 bit memory.
char: datatype that holds a singular character like a letter, symbol, or number but we cannot do arithmetic operations with them. Enclosed in single quotes.
String: datatype that holds a set of words, sentences, symbols that can be seperated by spaces. Enclosed in double quotes.
boolean: datatype that stores true or false only.
final: makes it so that the value of that variable can't be changed in the program.
if: Used to write an if statement (conditional statement)
for: Used when writing a for loop.
while: Used when writing a while loop.
class: used to define a class.
return: Used to return something from a method.
void: used to define a method as one that doesn't return anything.
public: It is an access modifier. It is used to define a class, method, or variable as being accessible from anywhere.
private: It is an access modifier. It is used to define a class, method, or variable as being accessible from within the class in which it is declared.
extends: Used to show that a class is a subclass of another class. (inheritance)
break- is used to shift control out of a certain block of code.
import- makes certain classes and directories accessible to be applied in one's code
new- used to create objects
null-used to show that a reference doesn't point to anything.
static-Used to indicate that a variable or method is remains constant for every instance of that class.
super-used to refer to the parent class from a subclass.
this-used to refer to the object for which a certain method is called.