Java LinkedBlockingDeque descendingIterator() methodThe 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 1Test it NowOutput: Ramesh Rita Rahul Reema Example 2Test it NowOutput: 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 3Test it NowOutput: 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 Next TopicJava Linkedblockingdeque |
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