Code: Select all
import java.util.*;
public class Book12{
public static void main(String args[])
{
BookList<TextBook12> list = new BookList<>();
list.add(new TextBook12());
System.out.println(list.count);
}
}
class TextBook12 extends Book12{ }
class BookList<TextBook12> extends ArrayList<TextBook12>
{
public int count = 0;
}
However, I cannot insert anything, not even an object of type TextBook12.
Why and how can i resolve it.
Thanx in advance