I have a problem with creating a Queue object.I dont know what is wrong.
My code:
import java.util.*;
public class Demo {
public static void main(String[] args) {
Queue<Integer> q = new LinkedList<Integer>();
}
}
Compiler error:
Exception in thread "main" java.lang.Error: Unresolved compilation problem: The type LinkedList is not generic; it cannot be parameterized with arguments
java.util.ArrayList