There are two cases in which items can be placed in a circular queue. They are as follows:
When front != 0 and rear = max -1. This makes it possible as the queue will not be full, and new elements can be inserted here.
When rear != max -1. This ensures that the rear is incremented to the maximum allocation size, and values can be inserted easily to the rear end of the queue.
Next on this Data Structures in Java  interview questions is a question that is commonly asked, so pay attention.