Java Deque descendingIterator() MethodThe descendingIterator() method of Java Deque Interface returns an iterator for the elements in the specified deque in a reverse sequence. The elements will return in a sequential order from first(head) to the last(tail). Syntax:Parameter:NA Return:The above method returns an iterator for the elements in the specified deque in a reverse sequence. Example 1Test it NowOutput: The list of numbers before using descendingIterator : 32 21 20 17 89 The list of numbers after using descendingIterator : 89 17 20 21 32 Example 2Test it NowOutput: The list of numbers before using descendingIterator : 20.0 11.0 66.0 89.0 77.0 The list of numbers after using descendingIterator : 77.0 89.0 66.0 11.0 20.0 Next TopicJava Deque |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India