keywords in java

In this article, we are going to discuss about keywords in java.

Keywords are predefine words in programing language. we cannot use these keywords as variable names because they are already predefined.

Java keywords:-

These are some java keywords written below.

  • abstract
  • continue
  • for
  • new
  • switch
  • assert
  • Default
  • goto
  • package
  • synchronized
  • boolean
  • Do
  • if
  • private
  • this
  • break
  • Double
  • implements
  • protected
  • throw
  • byte
  • else
  • import
  • public
  • throws
  • case
  • enum
  • instanceeof
  • return
  • transient
  • catch
  • extends
  • int
  • short
  • try
  • char
  • final
  • interface
  • static
  • void
  • class
  • finally
  • long
  • strictfp
  • volatile
  • const
  • float
  • native
  • super
  • while

You cannot use these keywords as a identifiers in your programs. goto keyword is no longer supported in java but we cannot use it as a variable name.

5 thoughts on “keywords in java”

Leave a Comment