Back to Multiple Choice Quiz
Instantiating a Generic Class
Java quiz · Question 28Given the generic class below, which line correctly creates a Box that holds a String?
Code
1class Box<T> {2 private T value;3 public Box(T value) { this.value = value; }4 public T getValue() { return value; }5}