19. Generic classes Flashcards
1
Q
What do we add to the name of a generic class in order to get a parameterized type?
A
ss
2
Q
What is the purpose of a bound type parameter?
A
s
3
Q
What is the difference between the following?
- public class C { }
- public class C { }
A
s
4
Q
Why can we not refer to type parameters in static methods of a generic class? What else can we not do with type parameters?
A
s
5
Q
What is the raw type of a generic class, and why does Java allow it to be used?
A
s
6
Q
What is the difference between the following?
- 10
- new Integer(10)
A
s
7
Q
Where is autoboxing and auto-unboxing occurring in the following?
Integer anInteger = 10;
Integer anotherInteger = anInteger + 1;
System.out.println(anotherInteger - anInteger);
A
s