Java Keywords
Keywords are predefined, reserved words used in Java programming that have special meanings to the compiler. For example:
int score;
Here, int is a keyword. It indicates that the variable score is of integer type (32-bit signed twos complement integer).
You cannot use keywords like int, for, class etc as variable name (or identifiers) as they are part of the Java programming language syntax. Heres the complete list of all keywords in Java programming.
abstract | assert | boolean | break |
byte | case | catch | char |
class | const | continue | default |
do | double | else | enum |
extends | final | finally | float |
for | goto | if | implements |
import | instanceof | int | interface |
long | native | new | package |
private | protected | public | return |
short | static | strictfp | super |
switch | synchronized | this | throw |
throws | transient | try | void |
true, false and null are not reserved words but cannot be used as identifiers, because it is literals of built-in types.
© 2024 Easy To Learning. All Rights Reserved | Design by Easy To Learning