I cannot compile below and keep getting an error like this: enter image description here
I have done the code on visual studio code and the file name is like this enter image description here
public class Main {
public static void main(String[] args) {
Queue<Integer> q = new LinkedList<>();
for (int i = 0; i < 5; i++)
q.add(i);
System.out.println("Elements of queue " + q);
int removedele = q.remove();
System.out.println("removed element-" + removedele);
System.out.println(q);
int head = q.peek();
System.out.println("head of queue-" + head);
System.out.println(q);
int size = q.size();
System.out.println("Size of queue-" + size);
System.out.println(q);
}
}