my code is like this: i have two classes first class:
public class Box<E> {
E data1;
public Box(E data) {
this.data1 = data;
}
public E getData() {
return data1;
}
}
second class:
public class IntBox extends Box<Integer>{
Integer data;
public IntBox(Integer data) {
this.data = data;
}
public Integer getData() {
return data;
}
}
why doesn't this class extend from Box<E>?
Box<Integer>, so that is the class that it extends from.