๐ฃ๐ Deque is a classic Java OCP trap.
Queue = FIFO.
Stack = LIFO.
The real trick is knowing head vs tail, and null vs exception for methods like poll(), remove(), peek(), element(), offer(), add(), and push() ๐
Carousel ๐
linkedin.com/posts/vvauban_โฆ
#Java #OCP #JavaCertification
โ๐OCP Java 21: Deque methods, do not mix them up | Vincent Vauban
๐ฃ๐ DEQUE: THE JAVA EXAM TRAP YOU SHOULD NOT UNDERESTIMATE ๐ธ TL;DR Deque is one of those Java APIs that looks simpleโฆ until the OCP asks you the difference between poll(), remove(), peek(),...
From linkedin.com 55







