//prints the head and deletes the head. q=[10,20,30] int n=q.poll();//returns 10 q=[20,30] int m=q.poll();//returns 20 q=[30]