- 2
Short java Queue program that perform enqueue and dequeue operation
,#java program #dequeue and enqueue
2 Respuestas
+ 4
The built-in LinkedList implements the Queue interface.
Queue<String> q = new LinkedList<>();
q.offer("Alpha");
q.offer("Beta");
System.out.println(q.poll());
System.out.println(q.poll());
Please don't use this forum to ask for solutions to your homework. This is a self-learning platform. You are expected to show some effort, and post your attempt before you ask for guidance, in case you are stuck. I expect your teacher will want you to create your own Queue class.
+ 2
Please link your code