Hard Keywords Flashcards
The following tokens are always interpreted as keywords and cannot be used as identifiers:
as - used for ______. _______ and specifies an ________ for an ________.
Used for type casts
Specifies an alias for an import
as? - is used for ______ ______ _________ .
is used for safe type casts
break - ____________ the execution of a loop
Terminates the execution of a loop
class - declares a __________.
declares a class
continue - proceeds to the ________ __________ ______.
Proceeds to the next step of the nearest enclosing loop
do - begins a _____ / ________ ________. (______ with a ________ condition)
Begins a do/while loop (loop with post condition)
else - defines the ________ of an _________ __________ which is executed when the ___________ is __________.
Defines the branch of an if expression which is executed when the condition is false
false - specifies the _______ value of the _________ type
specifies the ‘false’ value of the Boolean type
for - begins a ______ __________.
begins a for loop
fun - declares a ________.
declares a function
if - begins an ______ _________.
begins an if expression
4
specifies the object being iterated in a for loop
is used as an infix operator to check that a value belongs to a range, a collection or another entity that defines the ‘contains’ method
is used in when expressions for the same purpose
marks a type parameter as contravariant
!in
2
is used as an operator to check that a value does NOT belong to a range, a collection or another entity that defines the ‘contains’ method
is used in when expressions for the same purpose
interface - declares an __________.
declares an interface
is -
________ that a ______ has a certain ______.
Is used in _____ _____ for the same purpose.
checks that a value has a certain type
is used in when expressions for the same purpose