Keyword

Keyword

  • Access Modifiers
    • public
    • protected
    • default (no keyword required)
    • private
  • Non-Access Modifiers
    • static
    • final
    • abstract
    • synchronized
    • volatile
  • Class-Related Keywords
    • class
      • extends
    • interface
      • implements
    • enum
    • record
  • Object-Related Keywords
    • new
    • this
    • super
  • Method-Related Keywords
    • void
    • return
  • Control Flow Statements
    • for
    • while
    • do while
    • continue
    • break
    • if, else if, else
    • switch, case, default
  • Exception Handling
    • try, catch, finally
    • throw (used to explicitly throw an exception)
    • throws (used to declare that a method can throw exceptions)
  • Primitive Types
    • Boolean
      • boolean (1 bit in Theory) (Wrapper Class is Boolean)
    • Character
      • char (16 bits) (Wrapper Class is Character)
    • Integer
      • byte (8 bits) (Wrapper Class is Byte)
      • short (16 bits) (Wrapper Class is Short)
      • int (32 bits) (Wrapper Class is Integer)
      • long (64 bits) (Wrapper Class is Long)
    • Floating-Point
      • float (32 bits) (Wrapper Class is Float)
      • double (64 bits) (Wrapper Class is Double)
  • Package-Related Keywords
    • package
    • import
  • Literals (not keywords)
    • true
    • false
    • null