The peek()of the Queue interface
Peek () is a method of queue interface. It retrieves all the elements but does not remove the queue head. In case if the Queue is empty, then this method will return null.

core java

www.TechSearhWeb.com