classes and interfaces thus cannot be declared volatile, nor can local variables or parameters. while The while keyword is used to create a while loop, which tests a boolean expression and executes the block of statements associated with the loop if the expression evaluates to true; this continues until the expression evaluates to false. This keyword can also be used to create a do-while loop; see do. Reserved Identifiers The following identifiers are contextual keywords, and are only restricted in some contexts: exports module non-sealed Used to declare that a class or interface which extends a sealed class can be extended by unknown classes. open opens permits The permits clause specifies the classes that are permitted to extend a sealed class. provides record requires sealed A sealed class or interface can only be extended or implemented by classes and interfaces permitted to do so. to transitive uses var A special identifier that cannot be used as a type name (since Java 10). with yield Used to set a value for a switch expression, when using labelled statement groups (for example, case L:). Reserved words for literal values true A boolean literal value. false A boolean literal value. null A reference literal value. Unused const Although reserved as a keyword in Java, const is not used and has no function. For defining constants in Java, see the final keyword. goto Although reserved as a keyword in Java, goto is not used and has no function. strictfp (added in J2SE 1.2) Although reserved as a keyword in Java, strictfp is obsolete, and no longer has any function. Previously this keyword was used to restrict the precision and rounding of floating point calculations to ensure portability. See also Java annotation References External links Java (programming language) Java keywords