Java Keywords

Java keywords are also known as reserved words. While writing a java program these keywords are mainly used and which plays a vital role in the code. These predefined words cannot not be used to delcare a variable, object and class.

List of Java Keywords

abstract: This keyword particularly used to declare abstract class and methods.

boolean: This keyword is used to declare a boolean type variable true or false.

break: This keyword will be used to break looping and switch switch statement.

byte: This keyword is used to declare a byte variable.

case: This keyword will be used in switch statements to declare multiple blocks of statements with different cases.

catch: This keyword is used in exceptions to handle or catch an exception which raised by a particular peace of code.

char: This keyworld is used to delcare a char type variable.

class: This kwywordk is helpful in the creation of java class.

continue: This keyword will be used in looping statement to skip the current iteration.

default: This keyword is used in switch statement to delcare a default block of statement, this will be executed if no cases are matched.

do: This keyword is used in do-while looping statement to execute a block of code if the condition is satified or not.

double: This keyword is used to delcare a double type variable.

else: This keyword is used in control statement to execute incase if statement is false.

enum: This kwyword is used to declare enum class or constructor.

extends: This keyword is used to extend a class.

final: This keyword is applicable for class, method and variable. Which helps to declare a final class members.

finally: This keyword is used in exception handling to declare a finally block. if exception raised or not this will execute always.

float: This keyword is used to float variable type.

for: This keyword is used in looping statement to delcare the for loop.

if: This keyword is used in conditional statements to delcare the if condition.

implements: This keyword is used to implement an interface in java.

import: This keyword is used to import predefined or user defined classes, interfaces and static constants.

instanceof: This keyword is used in control statement to check the object is belongs to the specified class or not.

int: This keyword is used to delcare a integer type variable.

interface: This keyword is used only to create an interface in java.

long: This keyword is used to delcare a long type variable.

native: This keyword is used to specify a native code in java.

new: This keyword is used to instantiate a class object.

null: This keyword is used to mark a specific field as null.

package: This keyword will he helpful to delcare a package in java.

private: This keyword is applicable to variables, methods and constructors to specify private access modifier.

protected: This keyword is applicable to variables, methods to specify protected access modifier.

public: This keyword is applicable to variables, methods and classes to specify public access modifier.

return: This keyword is used to return a execution result from a method.

short: This keyword is used to declare a short type variable in java.

static: This keyword is applicable to variables, methods and static blocks.

strictfp: This keyword is applicable to variables and which is used to restrict the floating-point calculation.

super: This keyword is used in inheritance to access the super class members into the subclass.

switch: This keyword is used in control statements to delcare the switch statements.

synchronized: This keyword is used in multi threading concept to delcare the synchronized method and block.

this: This keyword is used in the class to refer the current object from members or constructor.

throw: This keyword is used in exception handling to throw the exception from the method.

throws: This keyword is used in exception to throws the checked exception to calling function.

transient: This keyword is used in serialization concept and it will be applicable to variable to not involve into the serialization and deserialization process.

try: This keyword is used in exception handling to delcare a try block.

void: This keyword is applicable to methods, which indicate returns nothing.

volatile: This keyword is applicable to variable to indicate that a variable may change asynchronously.

while: This keyword is used in looping statement to delcare a while loop.