No, there isn't and there shouldn't be either! Deleting from the front of an array would be a needlessly expensive way to do this.
You might be thinking of many scripting languages having a shift
operator to dequeue the next element (perl, bash, etc).
Edit: Just for posterity, here's a pretty simple implementation of Queue that would allow you to "fake" the same functionality (i.e. encapsulate the cursor):
class ArrayQueue<E> extends AbstractQueue<E> {
private int cursor = 0;
private final E[] data;
public ArrayQueue(E[] data) {
this.data = data;
}
private boolean inRange() {
return cursor < data.length;
}
@Override
public E peek() {
return inRange() ? data[cursor] : null;
}
@Override
public E poll() {
return inRange() ? data[cursor++] : null;
}
@Override
public boolean offer(E e) {
throw new UnsupportedOperationException();
}
@Override
public void clear() {
cursor = data.length;
}
@Override
public Iterator<E> iterator() {
//ommitted for brevity
}
@Override
public int size() {
return data.length - cursor;
}
}
Usage:
public static void main(String[] args) throws Exception {
Queue<String> argQ = new ArrayQueue<String>(args);
String command = argQ.poll();
String target = argQ.poll();
}
Warning: Untested