Java Deque size() MethodThe size() method of Deque interface is used to return the total number of elements present in the given deque. Syntax:Parameter:The above method requires only one parameter:
Specified by:size in interface Collection<E> Return:The above method is used to return the total number of elements present in the given deque. Example 1Test it NowOutput: The final deque is given as : 55.8 22.3 89.0 22.3 The size of the deque is : 4 Example 2Test it NowOutput: The final deque is given as : Computer Programming Language The size of the deque is : 3 Example 3Test it NowOutput: The final deque is given as : [A, B, C, D, E] The size of the deque is : 5 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