(Choose 1 answer)
A. void enqueue(Object x){ Node p = new Node(x);p.next = null;tail.next = p;tail = p;}
B. void enqueue(Object x){ Node p = new Node(x);p.next = null;if(isEmpty())head = tail = p;else{tail.next = p;tail = p;}
}
C. void enqueue(Object x){ Node p = new Node(x);p.next = null;if(isEmpty())head = tail = p;elsetail.next = p;}
D. void enqueue(Object x){ Node p = new Node(x);p.next = null;if(isEmpty())head = tail = p;elsetail = p;}
12