The Integer and Double Classes Flashcards
1
Q
Purpose of wrapper classes
A
To convert between primitive data and objects
2
Q
What type of input do ArrayLists accept?
A
only objects, not primitive data
3
Q
How are ints and doubles added to ArrayLists?
A
Using the Integer and Double classes
4
Q
autoboxing
A
Automatically converting primitive data to an object
5
Q
unboxing
A
When accessing data, it converts objects back to primitive data
6
Q
.intValue()
A
will get the value stored in the Integer wrapper class
7
Q
Integer.MAX_VALUE
A
return the largest value which an integer can store
8
Q
Integer.MIN_VALUE
A
return the smallest value that an integer can store
9
Q
Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY
A
allow infinity and negative infinity to be store in code
10
Q
A