ArrayDeque is a class that implements Deque.It can perform faster than Stack when used as a stack and faster than LinkedList when used as a queue.
Deque interface defines some methods that access the element at both ends. Which means that by the methods of this interface we can add and remove the elements at both ends.
Example:
package visualbuilder; //Insertion by using various methods System.out.println("Removing First Element :" + adObj.pollFirst()); //Reverse traversal |
Output:
Java Discussion
- - Java web application
- - Difference between BMT an
- - Replace getParameterValue
- - Interviewing Next week -
- - Sudoku solver





