What is the correct code for a constructor for such a linked list class?

A queue based on a linked list uses the following code

```
class Node
{
String element;
Node next;
Node (String el, Node n)
{
element = el;
next = n;
}
}
Node front, rear;

```

A) element = el; next = n;
B) front = rear;
C) front = null; rear = null;
D) front = element; rear = front;

C) front = null; rear = null;

Computer Science & Information Technology

You might also like to view...

What does the following code do? The first code listing contains the declaration of the Shape class. Each Shape object represents a closed shape with a number of sides. The second code listing contains a method (Mystery) created by a client of the Shape class. What does this method do?

What will be an ideal response?

Computer Science & Information Technology

Identify the letter of the choice that best matches the phrase or definition.

A. columns that show the structure of the layout grid B. appears in black text in CSS Designer panel C. usually refers to page color D. horizontal orientation E. fixed, absolute measurement unit used in, for example, margins and padding F. placeholder for content unique to each page in a website G. ?appears in gray, italicized text in CSS Designer panel H. saves critical development time by creating one site to be used on all devices I. vertical orientation J. usually refers to text color

Computer Science & Information Technology