Casting Flashcards
1
Q
Casting (A)(B)c * d order
A
c is cast to B, then to A, then multiplied by d
2
Q
Unboxing
A
Unboxing automatically turns a Int into an int(for example, inputting and Int to a method that wants an int
3
Q
Boxing
A
Coverts from a int/long/double -> Integer/Long/Double
4
Q
Automatic Conversions
A
byte->short->int->long->float->double
5
Q
(Integer)”Hello”; What type of Error is this?
A
compile error
6
Q
(Integer)(Object)”Hello”: What type of error is this?
A
Runtime cast error