In Java Programming,
There is no method in the Queue interface which isequivalent to the peek() method in the Stack interface. Devise oneand add it to the Queue interface. Be sure to specify whether itreturns the front or the back element of theQueue.
Expert Answer
An answer will be send to you shortly. . . . .