it's written in the book that
We get one error
kathy% javac1.5 RentalGeneric.java
RentalGeneric.java:38: cannot find symbol
symbol : method add(Cat)
location: interface java.util.List<Car>
But on my computer, everything is just fine. no compiler error and no runtime exception.
java6(java5), eclipse, windowxp
posted 6 years ago
You can't have that error in your code, because you have forgotten to add this line:
This list works for cars, but not for cats called Fluffy.