- 2

Short java Queue program that perform enqueue and dequeue operation

,#java program #dequeue and enqueue

31st Oct 2021, 4:34 AM
Jun ralph Fernandez
Jun ralph Fernandez - avatar
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.
31st Oct 2021, 4:51 AM
Tibor Santa
Tibor Santa - avatar
+ 2
Please link your code
31st Oct 2021, 4:48 AM
Lisa
Lisa - avatar