The type List is not generic; it cannot be parameterized with arguments <Integer>

Viewed 13

Can't make a new list in java, i read that i should use import java.util.List; Still getting the error of The type List is not generic; it cannot be parameterized with arguments

List<Integer> list = new ArrayList<>();
    
    list.add(5);
    list.add(12);
    list.add(7);
    list.add(25);
    list.add(3);
1 Answers

There was a problem with some settings so after changing them now it's working.

Related