import java.util.*;
public class GenericsPractice {
public static void main(
String[] args) {
List<Apple> l1= new ArrayList<Apple>();
}
}
class Apple
{
public void color(){
System.out.println("Apple Color");
}
}
When I compile this code I get the following error at line 3 ,"the class List is not generic ,it cannot be parametrised with with arguments "apple".
Can anyone explain this please..?