JAVA Reserved Words

 Posted by at 7:31 pm  Coding & Scripting, JAVA  Comments Off on JAVA Reserved Words
Aug 222009
 

JAVA identifiers should be meaningful, but they cannot include the following reserved words (if you don’t rust me ask the Oracle):

  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. false*
  19. final
  20. finally
  21. float
  22. for
  23. goto
  24. if
  25. implements
  26. import
  27. instanceof
  28. int
  29. interface
  30. long
  31. native
  32. new
  33. null*
  34. package
  35. private
  36. protected
  37. public
  38. return
  39. short
  40. static
  41. strictfp
  42. super
  43. switch
  44. synchronized
  45. this
  46. throw
  47. throws
  48. transient
  49. true*
  50. try
  51. void
  52. volatile
  53. while

* Predefined literals that cannot be used as identifiers