Code example for Queue

Methods: clear

0
            inputQ.add(input);
        } 
    } 
 
    public void clearInput() { 
        inputQ.clear();
    } 
 
    public String getInput() {
        try { 
            return inputQ.remove();
        } catch (java.util.NoSuchElementException e) {
            return ""; 
        } 
    } 
 
    public void sendCoordinate(Integer row, Integer column) {
        String terminalInput = row.toString() + "," + column.toString();
        enqueueInput(terminalInput);
    }