Operators Flashcards

1
Q

+, -, *, /, %

A

mathematical operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • is also used to
A

pass an array to a vararg parameter

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

= - __________ operator and is used to specify _________ values for ___________.

A

assignment operator and is used to specify default values for parameters

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

+=, -=, *=, /=, %=

____________ _________ operators

A

augmented assignment operators

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

++, –

__________ and _________ operators

A

increment and decrement operators

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

&&, ||, !

____________ operators

A

logical ‘and’, ‘or’, ‘not’ operators

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

==, !=

_________ operatos

Translated to calls of __________ () for non-primitive types.

A

equality operators (translated to calls of equals() for non-primitive types)

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

===, !==

__________. __________ operators.

A

referential equality operators

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

less/greater than and less/greater or equal to

__________ operators
Translated to calls of __________ () for non-primitive types.

A

comparison operators (translated to calls of compareTo() for non-primitive types)

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

[, ]

________ ________ operators
Translated to calls of _________ and ___________.

A

indexed access operator (translated to calls of get and set)

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

!! asserts that an ___________ is ____________ .

A

… an expression is non-null

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

?. Performs a _______ _______

A

performs a safe call

calls a method or accesses a property if the receiver is non-null

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

?:. The __________ operator

_______ the right hand value if the left hand value is ________

A

takes the right-hand value if the left-hand value is null

the elvis operator

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

::creates a _______ or a _________ reference.

A

creates a member reference or a class reference

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

.. creates a _________

A

creates a range

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

: separates a _____ from a ______ in ____________.

A

separates a name from a type in declarations

17
Q

? marks a _______ as __________.

A

marks a type as nullable

18
Q

-> (3)
Separates the _____ and ____ of a lambda _______.

Separates the _____ and _____ _______ _______ in a function type.

A

separates the parameters and body of a lambda expression

separates the parameters and return type declaration in a function type

separates the condition and body of a when expression branch

19
Q

@

introduces an ________________

introduces or references a

1) __________ label
2) ___________ label

references a

1) ______ expression from an _______ scope
2) an __________ superclass

A

introduces an annotation

introduces or references a loop label

introduces or references a lambda label

references a ‘this’ expression from an outer scope

references an outer superclass

20
Q

;. Separates _______ statements on the ________ line.

A

separates multiple statements on the same line

21
Q

$

References a __________ or ________ in a _______. ________

A

references a variable or expression in a string template

22
Q

_ (2)

Substitutes an _________ parameter in a __________ expression and in a _________ declaration

A

substitutes an unused parameter in a lambda expression

substitutes an unused parameter in a destructuring declaration