Hard Keywords Flashcards

The following tokens are always interpreted as keywords and cannot be used as identifiers:

1
Q

as - used for ______. _______ and specifies an ________ for an ________.

A

Used for type casts

Specifies an alias for an import

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

as? - is used for ______ ______ _________ .

A

is used for safe type casts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

break - ____________ the execution of a loop

A

Terminates the execution of a loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

class - declares a __________.

A

declares a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

continue - proceeds to the ________ __________ ______.

A

Proceeds to the next step of the nearest enclosing loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

do - begins a _____ / ________ ________. (______ with a ________ condition)

A

Begins a do/while loop (loop with post condition)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

else - defines the ________ of an _________ __________ which is executed when the ___________ is __________.

A

Defines the branch of an if expression which is executed when the condition is false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

false - specifies the _______ value of the _________ type

A

specifies the ‘false’ value of the Boolean type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

for - begins a ______ __________.

A

begins a for loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

fun - declares a ________.

A

declares a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

if - begins an ______ _________.

A

begins an if expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

4

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

!in

2

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

interface - declares an __________.

A

declares an interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

is -
________ that a ______ has a certain ______.

Is used in _____ _____ for the same purpose.

A

checks that a value has a certain type

is used in when expressions for the same purpose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

!is - checks that a _______ does ______ have a certain _______.

Is used in ______ ________ for the same purpose.

A

checks that a value does NOT have a certain type

is used in when expressions for the same purpose

17
Q

null - is a _________ representing an ______ __________ that doesn’t point to any ________.

A

is a constant representing an object reference that doesn’t point to any object

18
Q

object - defines a _______ and it’s _________ at the same time.

A

declares a class and its instance at the same time

19
Q

package - specifies the ________ for the ________ _______.

A

specifies the package for the current file

20
Q

return - ________ from the nearest enclosing ________ or ___________ ________.

A

returns from the nearest enclosing function or anonymous function

21
Q

super (2)

A

refers to the superclass implementation of a method or property

calls the superclass constructor from a secondary constructor

22
Q

this (2)

A

refers to the current receiver

calls another constructor of the same class from a secondary constructor

23
Q

throw

A

throws an exception

24
Q

true

A

specifies the ‘true’ value of the Boolean type

25
Q

try - begins an _________ ___________ block

A

begins an exception handling block

26
Q

typealias - declares a _____ _______

A

declares a type alias

27
Q

typeof - (________ for future use)

A

(reserved for future use)

28
Q

val

A

declares a read-only property or local variable

29
Q

var

A

declares a mutable property or local variable

30
Q

when - begins a ______ _______ (executes one of the given _______)

A

begins a when expression (executes one of the given branches)

31
Q

while - begins a _____ ______ (_______ with _________)

A

begins a while loop (loop with precondition)