0% found this document useful (0 votes)
5 views2 pages

Keywords in Java

The document lists all Java keywords along with their definitions and uses. Each keyword serves a specific purpose in Java programming, such as declaring data types, controlling flow, and handling exceptions. The list includes keywords like 'abstract', 'class', 'if', 'for', and others, providing a comprehensive reference for Java developers.

Uploaded by

jahnavi garg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Keywords in Java

The document lists all Java keywords along with their definitions and uses. Each keyword serves a specific purpose in Java programming, such as declaring data types, controlling flow, and handling exceptions. The list includes keywords like 'abstract', 'class', 'if', 'for', and others, providing a comprehensive reference for Java developers.

Uploaded by

jahnavi garg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

All Java Keywords :

1.​ abstract – Used to declare abstract class or method.


2.​ assert – Used for debugging; tests a condition.
3.​ boolean – Declares a true/false variable.
4.​ break – Exits loop or switch statement.
5.​ byte – 1-byte integer data type.
6.​ case – Defines a block in switch statement.
7.​ catch – Handles exceptions.
8.​ char – Stores a single character.
9.​ class – Declares a class.
10.​const – Reserved but not used.
11.​continue – Skips current loop iteration.
12.​default – Default block in switch statement.
13.​do – Used in do-while loop.
14.​double – 8-byte decimal number.
15.​else – Executes when if condition is false.
16.​enum – Defines a group of constants.
17.​extends – Inherits another class.
18.​final – Prevents modification (variable, method, class).
19.​finally – Executes after try-catch block.
20.​float – 4-byte decimal number.
21.​for – Loop structure.
22.​goto – Reserved but not used.
23.​if – Conditional statement.
24.​implements – Implements an interface.
25.​import – Imports packages or classes.
26.​instanceof – Checks object type.
27.​int – 4-byte integer.
28.​interface – Declares an interface.
29.​long – 8-byte integer.
30.​native – Used for methods implemented in native code.
31.​new – Creates an object.
32.​package – Declares a package.
33.​private – Accessible within class only.
34.​protected – Accessible within package and subclasses.
35.​public – Accessible everywhere.
36.​return – Returns value from method.
37.​short – 2-byte integer.
38.​static – Belongs to class rather than object.
39.​strictfp – Restricts floating-point calculations.
40.​super – Refers to parent class.
41.​switch – Multi-way conditional statement.
42.​synchronized – Controls thread access.
43.​this – Refers to current object.
44.​throw – Explicitly throws exception.
45.​throws – Declares exceptions.
46.​transient – Prevents variable serialization.
47.​try – Defines block for exception handling.
48.​void – Indicates no return type.
49.​volatile – Variable modified by multiple threads.
50.​while – Loop that runs while condition is true.

You might also like