What type is chosen as parameter type T in the following code:
Box box = new Box();
box.set(10L);
Here, Box is a generic class:
class Box<T> {
T value;
void set(T value) {
this.value = value;
}
}What type is chosen as parameter type T in the following code:
Box box = new Box();
box.set(10L);
Here, Box is a generic class:
class Box<T> {
T value;
void set(T value) {
this.value = value;
}
}Create a free account to access the full topic