I read in the book for OCJP for Java6 the part with assertions. I reached the part where it gives me an overview of how the compiler reacts if the word \'assert\' is used as key
Identifiers are names of variables. For example in
int a = 3;
a
would the identifier. Keywords, on the other hand, are reserved (i.e. you can't name a variable with a keyword), pre-defined words that have a specific meaning in the language. For example in
if (a == 3)
System.out.println("Hello World");
if
is a keyword. It has a specific function and cannot be used as a variable name. Moreover, the words used to declare primitive types are all keywords as well, e.g. int
, char
, long
, boolean
etc. You can see a full list of Java keywords here