4
4
Keywords or Reserved words are the words in a language that These words are therefore not allowed to use as variable names or objects.
Assert describes a predicate placed in a java program to indicate that the developer
2. assert
thinks that the predicate is always true at that place.
3. boolean A data type that can hold True and False values only
8. char A data type that can hold unsigned 16-bit Unicode characters
13. double A data type that can hold 64-bit floating-point numbers
A Java keyword is used to declare an enumerated type. Enumerations extend the base
15. enum
class.
16. extends Indicates that a class is derived from another class or interface
17. final Indicates that a variable holds a constant value or that a method will not be overridden
18. finally Indicates a block of code in a try-catch structure that will always be executed
24. instanceof Indicates whether an object is an instance of a specific class or implements an interface
25. int A data type that can hold a 32-bit signed integer
28. native Specifies that a method is implemented with native (platform-specific) code
30. null This indicates that a reference does not refer to anything
An access specifier indicating that a method or variable may be accessed only in the
32. private
class it’s declared in
An access specifier indicating that a method or variable may only be accessed in the
33. protected class it’s declared in (or a subclass of the class it’s declared in or other classes in the
same package)
Java Keywords 1
An access specifier used for classes, interfaces, methods, and variables indicating that an
34. public item is accessible throughout the application (or where the class that defines it is
accessible)
35. return Sends control and possibly a return value back from a called method
Indicates that a variable or method is a class method (rather than being limited to one
37 static
particular object)
39. super Refers to a class’s base class (used in a method or class constructor)
45. transient Specifies that a variable is not part of an object’s persistent state
46. try Starts a block of code that will be tested for exceptions
47. void Specifies that a method does not have a return value
Note: true, false and null are not keywords, but they are Reserved literals that cannot be used as identifiers.
The keywords
const and goto are reserved, even they are not currently in use. Currently they are no longer supported in Java.
Java Keywords 2
DURGA SIR :-
if, else , switch , case , default , do , while , for , break , continue , return………………………………….11
public , private , protected , static , final , synchronized , native , {strictfp} , transient ,volatile…11
try , catch ,throw , throws , finally , {assert}…………………………………………………………………………….….6
Java Keywords 3