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

Java Keywords Notes

The document lists Java reserved keywords categorized into data types, access modifiers, class and object definitions, control flow statements, exception handling, OOP concepts, and other miscellaneous keywords. Each keyword is accompanied by a brief description of its use in Java programming. Additionally, it notes that 'goto' and 'const' are reserved but unused keywords.

Uploaded by

pgame87
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

Java Keywords Notes

The document lists Java reserved keywords categorized into data types, access modifiers, class and object definitions, control flow statements, exception handling, OOP concepts, and other miscellaneous keywords. Each keyword is accompanied by a brief description of its use in Java programming. Additionally, it notes that 'goto' and 'const' are reserved but unused keywords.

Uploaded by

pgame87
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

Java Reserved Keywords with Uses

Data Types
• int – integer values
• float – decimal (single precision)
• double – double precision decimal
• char – single character
• boolean – true/false values
• byte – small integer
• short – short integer
• long – large integer

Access Modifiers
• public – accessible everywhere
• private – within class only
• protected – within package + subclass

Class & Object


• class – define class
• interface – define interface
• extends – inheritance
• implements – implement interface
• new – create object

Control Flow
• if, else – conditions
• switch, case, default – multiple selection
• for, while, do – loops
• break – exit loop
• continue – skip iteration
• return – exit method

Exception Handling
• try – test block
• catch – handle exception
• finally – always executes
• throw – throw exception
• throws – declare exception
OOP Concepts
• this – current object
• super – parent class
• instanceof – check object type
• abstract – abstract class/method
• final – constant/prevent override

Others
• static – shared variable
• void – no return
• synchronized – thread control
• volatile – memory consistency
• package – define package
• import – import classes
• enum – enumeration
• assert – debugging
• transient – skip serialization
• native – non-java code
• strictfp – floating precision
• goto, const – reserved unused

You might also like