keyword in java
keyword is a key of the code.It used to varible , method , class and other.Each keyword perform specific operation.
Keywords
S.No | Keyword | Explain |
---|---|---|
abstract | abstract keyword used to the class and method.In abstract method you can't define the abstract class. | |
boolean | boolean is a datatype. | |
break | break keyword used to exit loop. | |
byte | byte is a datatype. | |
case | case used to the swith. | |
catch | catch used to the Exception handling. | |
char | char is datatype. | |
class | class is a blue print of object.It used to create object. | |
continue | continue keyword used to skip the specific iteration. | |
default | default keyword used to switch. | |
do | do keyword used to do while loop. | |
double | double is a datatype. | |
else | else keyword used in conditional block. | |
enum | enum used to define the constants variable | |
extends | extends keyword used to Inherit the class. | |
final | final keyword used to declare constant value,method and class. | |
finally | finally keyword used to Exception handling. | |
float | float is a datatype. | |
for | for keyword used to loop. | |
if | if keyword used to condition block. | |
implements | implements keyword used to inherit the interface. | |
import | import keyword used to import the classes. | |
instanceof | instanceof keyword used to check the object available in class or subclass or interface. | |
interface | interface is a abstract class.It mostly used to multiple inheritance. | |
long | long is a datatype. | |
new | new keyword used to create the object. | |
null | null is a Empty. | |
package | package is a set of class. | |
private | private keyword used to access the variable,method and class in inside the class only. | |
protected | protected keyword used to access the variable,method and class specific package only. | |
public | public keyword used to access the variable or method or constructors anywhere. | |
return | It return value or function. | |
short | short is a datatype. | |
static | static keyword used to access the varible , method and class without creating the object. | |
strictfp | strictfp keyword used to you will get the same result on every platform. | |
super | super keyword used to access the super class(parent class). | |
switch | switch is a Multiple branching statement | |
this | this keyword used to object oriented data. | |
throw | throw keyword used to Exception handling. | |
throws | throws keyword used to Exception handling. | |
transient | transient keyword used to make the default value. | |
try | try keyword used to Exception handling | |
void | void keyword used method declaration.In void mathod can't return anything. | |
volatile | volatile variable will instruct JVM threads to read the value of volatile variable from main memory. | |
while | while keyword used to loop. |