Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
Why does Java have generics, and what is type erasure?JuniorWhy can't you write new T() or check instanceof List<String> in Java? And how do you choose between List<? extends Number> and List<? super Integer>?Mid-levelTell me about type erasure in Java generics. What limitations does it impose, and how do you use wildcard types when designing an API?Senior