public MyQueue (int initialCapacity) Initialize aMyDeque object…  public MyQueue (int initialCapacity)Initialize a MyDeque object wi

public MyQueue (int initialCapacity) Initialize aMyDeque object…  public MyQueue (int initialCapacity)Initialize a MyDeque object with the parameter initialCapacity.Nonepublic boolean empty()Checks whether or not the stack is empty. If it is empty, return true.Nonepublic void enqueue(E e)Adds the specified element to the back of the queue.Nonepublic E dequeue()Removes an element from the front of the queue. Returns the removed element, or null if there was no such element.Nonepublic E peek()Returns the element at the front of the queue.Nonepublic int size()Returns the number of elements in the queue.None  Computer Science Engineering & Technology Java Programming COM SCI 31 Share QuestionEmailCopy link