Examining Deque Methods in Java

Day 31 - Examination methods in Deque 1) getFirst( ) : Retrieves, but what doesn't remove the first element. 2) getLast( ) : Retrieves, but does not remove the last element 3) peekFirst( ) : Retrieves, but does not remove the first element or return if empty null if empty. 4) peekLast( ) : Retrieves, but does not remove the last element or returns nullif empty. ● Stack methods: 1) push( ) : Adds an element at the first. 2) pop ( ) : Removes and returns the first element. #Java #Programming #coding #learning #Corejava EchoBrains

  • chart, diagram, box and whisker chart

To view or add a comment, sign in

Explore content categories