Java Keywords

Keywords are words that cannot be used to name variables. If you attempt to use one of these names for a variable you will get a compile time error.

Java Keywords

abstract

boolean

break

byte

case

catch

char

class

const *

continue

default

do

double

else

extends

final

finally

float

for

goto *

if

implements

import

instanceof

int

interface

long

native

new

null

package

private

protected

public

return

short

static

super

switch

synchronized

this

throw

throws

transient

try

void

volatile

while

The words with asterisks are reserved and not currently used. Note that all of the keywords are in lowercase, thus null is a keyword but NULL is not.

Last modified: Thursday, 24 July 2014, 2:54 PM