in constant time we leave the details of implementing the deque adt efficiently in java as an exercise ( - incidentallyall of the methods of the deque adtas described aboveare included in the java util linkedlist class soif we need to use deque and would rather not implement one from scratchwe can simply use the built-in java util linkedlist class in any casewe show deque interface in code fragment and an implementation of this interface in code fragment code fragment interface deque documented with comments in javadoc style (section note also the use of the generic parameterized typeewhich implies that deque can contain elements of any specified class