CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
Java Quiz #28

Instantiating a Generic Class

easyGenerics, Classes

Given 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}