Numbers Flashcards

1
Q

How big is a Byte number?

A

8-bit signed integer

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

How big is a Short number?

A

16-bit signed integer

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

How big is a Int number?

A

32-bit signed integer

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

How big is a Long number?

A

64-bit signed integer

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

What is a Float number?

A

A 32-bit floating point number.

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

What is a Double number?

A

A 64-bit floating point number.

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

What class do all numbers extend?

A

All numbers in Kotlin are object and they extend the Number class.

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

What can we use instead of Modulo?

A

Primitive.rem() (Remainder)

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

What can all subclasses of Number do?

A

Be converted to any other Number sub-type or Char.

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

How can we make long numbers more readable?

A

Use underscores. E.g. 1_000_000

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