OOP module 7 Flashcards

1
Q

A _____________ stores a reference (or address) to the memory location where the corresponding data is stored.

A

reference type

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

_________ are the basic types and include byte, short, int, long, float, double, boolean, and char.

A

Value types

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

The ___ defines a number of useful classes, one of them being Math class, which provides predefined methods for mathematical operations.

A

JDK

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

Use the _____ keyword to mark a variable constant so that it can be assigned only once

A

final

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

_________ takes two (2) parameters and returns the first parameter raised to the power of the second parameter.

A

Math.pow()

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

Conversely, _______ returns the smallest parameter.

A

Math.min()

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

Similarly, _______ rounds a floating point value down to the nearest integer value.

A

Math.floor()

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

_________ rounds a floating point value up to the nearest integer value. The rounded value is
returned as a double.

A

Math.ceil()

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

________ returns the absolute value of its parameter

A

Math.abs()

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

__ is now a constant. Any attempt to assign it a value will cause an error

A

PI

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