All Java8 keywords vs literals


These are the 50 Java keywords that are not allowed to be used as identifiers:
abstract, continue, for, new, switch,
assert, default, if, package, synchronized,
boolean, do, goto, private, this,
break, double, implements, protected, throw,
byte, else, import, public, throws,
case, enum, instanceof, return, transient,
catch, extends, int, short, try,
char, final, interface, static, void,
class, finally, long, strictfp, volatile,
const, float, native, super, while

The const and goto keywords are reserved and not currently used.

You might wonder why null, true, and false have not been mentioned in the list. Those are literals and no keywords. Literals are also in-source values like "this is a string" (String literal) or numbers like "1.234_456d" (double literal).

Comments

Popular posts from this blog

Tuning ext4 for performance with emphasis on SSD usage

Java 8: Default Interface Implementations, The Diamond Problem, Multiple Inheritance, and Precedence

Tuning ext3 for performance without losing its data integrity potential