Amazon Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: Phone Interview
Oh stop the shameless promotions for other sites. I think it's legitimate to post a *direct link to a specific, single video* if the video answers *the exact question being asked*, but this is pretty close to just being spam.
There doesn't seem to be one. If you want to build attention for your video lectures, I would recommend only posting links that directly answer the exact question being asked. What's your goal with these vids anyway?
Generics were introduced to the Java language to provide tighter type checks at compile time and to support generic programming. To implement generics, the Java compiler applies type erasure to:
- gadolin July 14, 2012•Replace all type parameters in generic types with their bounds or Object if the type parameters are unbounded. The produced bytecode, therefore, contains only ordinary classes, interfaces, and methods.
•Insert type casts if necessary to preserve type safety.
•Generate bridge methods to preserve polymorphism in extended generic types.
Type erasure ensures that no new classes are created for parameterized types; consequently, generics incur no runtime overhead.