February 2014
Beginner
1248 pages
62h 25m
English
• When a generic method is compiled, the compiler performs erasure (p. 848) to remove the type-parameter section and replace the type parameters with actual types. By default each type parameter is replaced with its upper bound (p. 848), which is Object unless specified otherwise.
• When erasure is performed on a method that returns a type variable (p. 848), explicit casts are inserted in front of each method call to ensure that the returned value has the type expected by the caller.
Read now
Unlock full access