Class_Examples/src/Queue/LinkedQueue.java
public void enqueue(String s)
    {
        if(rear != null)
        {
            rear.next = new Node(s, null);
            rear = rear.next;
        }
        else
        {
            rear =  new Node(s, null);
            front = rear;
        }
    }
// last node in list, where items are added
last node in list, where items are added
last node in list where items are added
public void enqueue(String s)
    {
        if(rear != null)
        {
            rear.next = new Node(s, null);
            rear = rear.next;
        }
        else
        {
            rear =  new Node(s, null);
            front = rear;
        }
    }
public void enqueue ( String s ) { if ( rear != null ) { rear . next = new Node ( s , null ) ; rear = rear . next ; } else { rear = new Node ( s , null ) ; front = rear ; } }
last node in list, where items are added
last node in list where items are added