0


A keyword or reserved word in Java has a special meaning and cannot be used as a user defined identifier, because they are used by the compiler and if you use them as variable names, compiler will generate errors.

Keywords
Description
abstract
It declares that a class or method is abstract
assert
Used to specify assertions
boolean
Declares that variable is Boolean type
break
Used to exit a loop before end of the loop is reached
byte
Declares that variable is byte type
case
To represent different conditions in switch statement
catch
Used for handling exceptions, i.e., capture the exceptions thrown by some actions
char
Declares that variable is character type
class
Signals the beginning of a class definition
const
This keyword is reserved by Java but now it is not in use
continue
Prematurely return to the beginning of a loop
default
Default action in switch statement
do
Begins a do while loop
double
Declares that variable is double type
else
Signals the code to be executed when if condition executes to false
extends
Specifies the class base from which the correct class is inherited
final
Declares that a class may not be extended or that a field or method may not be overridden
finally
Declares a block of code guaranteed to be executed
float
Declares a floating point variable
for
Start a for loop
goto
This keyword is reserved by Java but now it is not in use
if
Keyword to represent conditional statement
implements
Declares that this class implements the given interface
import
permits access to a class or group of classes in a package
Instance of
tests whether an object is an instance of a class
int
Declares an integer variable
interface
signals the beginning of an interface definition
long
Declares a long integer variable
native
Declares that a method that is implemented in native code
new
Allocates memory to an object dynamically
package
Defines the package to which this source code file belongs
private
Declares a method or member variable to be private
protected
Declares a class, method or member variable to be protected
public
Declares a class, method or member variable to be public
return
Returns a value from a method
short
Declares a short integer variable
static
Declares that a field or a method belongs to a class rather than an object
strictfp
To declare that a method or class must be run with exact IEEE 754 semantics
super
A reference to the parent of the current object
switch
Tests for the truth of various possible cases
synchronized
Indicates that a section of code is not thread-safe
this
A reference to the current object
throws
Declares the exceptions thrown by a method
transient
Data should not be serialized
try
Attempt an operation that may throw an exception
void
Declare that a method does not return a value
volatile
Warns the compiler that a variable changes asynchronously
while
Begins a while loop

Post a Comment

Comment Rules :
1. Do not post Adult/illegal Links.
2. Try to comment in only English Language.
3. Do not post other website's links which are useless.
4. Your Comment should be based on the Topic for other queries Kindly Visit our Contact Us Page.
5. Do not use Abusive Language.
6. Respect each other.
Thank You for following the rules. Please Comment....

 
Top