Here is my code bellow. This is any abstract class with instance array queue. I never assign array size anywhere. But I can still use the array and can iterate to add data to the array. How is this possible?
public abstract class Operations {
int queue[];
int head;
int tail;
public abstract String enqueue(int value);
public abstract String dequeue();
public abstract String peek();
public abstract String delete();
public abstract boolean isEmpty();
public abstract boolean isFull();
public abstract void display();
}
nulland will throw aNullPointerExceptionwhen used. This being an abstract class, can you also show an implementation of this class that is actually used?