通过 Deque 迭代
//Using Iterator
Iterator iterator = deque.iterator();
while(iterator.hasNext(){
String Item = (String) iterator.next();
}
//Using For Loop
for(Object object : deque) {
String Item = (String) object;
}
//Using Iterator
Iterator iterator = deque.iterator();
while(iterator.hasNext(){
String Item = (String) iterator.next();
}
//Using For Loop
for(Object object : deque) {
String Item = (String) object;
}