Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

dequeue element to queue java

Queue<String> queue = new LinkedList<>();

queue.add("element 1");
queue.add("element 2");

String element1 = queue.poll();

String element2 = queue.remove();
Source by jenkov.com #
 
PREVIOUS NEXT
Tagged: #dequeue #element #queue #java
ADD COMMENT
Topic
Name
1+6 =