While running the following script I am getting,
AnimalDoctorGeneric.java:12: type ArrayList does not take parameters
List<Dog> dogs = new ArrayList<Dog>();
What is the problem? please help
import java.util.*;
abstract class Animal {
public abstract void checkup();
}
class Dog extends Animal {
public void checkup() {
System.out.println("Dog checkup");
}
}
public class AnimalDoctorGeneric {
public static void main(
String[] args) {
List<Dog> dogs = new ArrayList<Dog>();
}
}