Array Implementation of Queue
Your fields size and queue have package access, they need to be private so only your class can control them.

private final int size;
private final T[] queue;


And because their values are known at initialization, its good practice to declare them final.

your isempty method is not Camelcase, use isEmpty instead.
Some validation on the size parameter is needed as well.

 if(size&lt;=0){
  throw new IllegalArgumentException("Size cannot be less than or equal to zero");
 }


Something I love about the this keyword is that it helps you finding a name for your variables

 public Queue(int size) { // size is more relevant than inSize 
   if(size&lt;=0){
       throw new IllegalArgumentException("Size cannot be less than or equal to zero");
    }
    this.size = size;
    queue = (T[]) new Object[size];
    front = -1;
    rear = -1;
}