For checking the full condition of a queue you have to check whether the number of elements in the array are equal to the size of the array.If they are equal then we can that the queue is full.
Checking frontindex equal to backindex is for checking if the queue is empty.
In option C we have to check for arrayFullException but it will not be a good approach.
So we conclude by saying that the answer is option D.