If your
Queue
class needs, internally a linked list, then you might write something like
import java.util.*;
class Queue
{
LinkedList<Integer> m_llist;
public Queue()
{
m_llist = new LinkedList<>();
}
public void add(int i)
{
m_llist.add(i);
}
public static void main(String[] args)
{
Queue q = new Queue();
q.add(8);
q.add(8);
q.add(9);
}
}