Java LinkedBlockingDeque descendingIterator() method

21 Mar 2025 | 2 min read

The descendingIterator() method of LinkedBlockingDeque class returns an iterator over the elements of this queue. The elements are returned in the reverse sequential order.

Syntax:

Parameters:

NA

Specified By:

The descendingIterator() method of LinkedBlockingDeque class is specified by descendingIterator() method of interface Deque<E>.

Return Value:

The descendingIterator() method returns an iterator across the elements of this deque in reverse order.

Example 1

Output:

 Ramesh Rita Rahul Reema 

Example 2

Output:

 Characters : [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,] After reversing the characters : [Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,] 

Example 3

Output:

 1..Roll No. = 17cs1029 College = MR University Name = Vineet 2..Roll No. = 15cs1010 College = MVN University Name = Geetanjali 3..Roll No. = 15cs1029 College = MVN University Name = Reema