Skip to main content

Java Language Keywords

Java Language Keywords

Here is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used. true, false, and null might seem like keywords, but they are actually literals; you cannot use them as identifiers in your programs.


  1. abstract
  2. assert***
  3. boolean
  4. break
  5. byte
  6. case
  7. catch
  8. char
  9. class
  10. const*
  11. continue
  12. default
  13. do
  14. double
  15. else
  16. enum****
  17. extends
  18. final
  19. finally
  20. float
  21. for
  22. goto*
  23. if
  24. implements
  25. import
  26. instanceof
  27. int
  28. interface
  29. long
  30. native
  31. new
  32. package
  33. private
  34. protected
  35. public
  36. return
  37. short
  38. static
  39. strictfp**
  40. super
  41. switch
  42. synchronized
  43. this
  44. throw
  45. throws
  46. transient
  47. try
  48. void
  49. volatile
  50. while



* not used (const* , goto*)

** added in 1.2 (strictfp**)

*** added in 1.4 (assert***)

**** added in 5.0 (enum****)


Note: The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.

See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.



By 

Aarif Husain

Comments

Popular posts from this blog

Data type in Java

Data type in Java Boolean Data Type The Boolean data type is used to store only two possible values: true and false. This data type is used for simple flags that track true/false conditions. The Boolean data type specifies one bit of information, but its "size" can't be defined precisely. Example: Boolean one =  false    Byte Data Type The byte data type is an example of primitive data type. It isan 8-bit signed two's complement integer. Its value-range lies between -128 to 127 (inclusive). Its minimum value is -128 and maximum value is 127. Its default value is 0. The byte data type is used to save memory in large arrays where the memory savings is most required. It saves space because a byte is 4 times smaller than an integer. It can also be used in place of "int" data type. Example: byte  a =  10 ,  byte  b = - 20    Short Data Type The short data type is a 16-bit signed two's complement integer. Its value-range li...

A message for you

You can connect with me on Telegram - @aarifhusaincom