Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
Can you declare a generic array of type T in Java?
Think about what type parameters mean in terms of concrete classes.
What is a wrapper class in Java?
Consider examples you learned about, like Integer for int.
Can you create an array of a generic type T?
Think about how arrays work with types.
Can static fields be of generic type?
Consider what static members actually represent.
Given a generic class, design a method that demonstrates type erasure and explain what issues could arise if type information were preserved.
Consider the practical effects on type integrity.
Write a snippet of code attempting to create a static field as a generic type and explain the compilation error it produces.
Reference back to the rules of static members.
5 more questions in this section. Enroll free to practise them all.
Enroll free