Java Deque iterator() Method
The iterator() method of Java Deque Interface is used to return an iterator for the elements in the deque in a proper sequence. The elements are returned in a order from first(head) to last(tail).
The above method returns an iterator for the elements in the given deque in a proper sequence.
Example 1Test it Now
The series of month is given as : January February March April May June July August September October November December
Example 2Test it Now
The series of marks is given as : 34.0 25.0 66.0 39.0