Main class not found , this is the error compiler is printing , what to do

import java.util.*;

class Queue {

protected int size;

protected int front;
protected int[] data;

public Queue() {
	this.size = 0;
	this.front = 0;
	this.data = new int[5];
}

public Queue(int cap) {
	this.size = 0;
	this.front = 0;
	this.data = new int[cap];
}

public int size() {
	return size;
}

public boolean isEmpty() {
	return (size == 0);
}

public void enqueue(int item) throws Exception {
	if (this.size() == this.data.length) {
		int[] oa = this.data;
		int[] na = new int[oa.length * 2];
		for (int i = 0; i < this.size(); i++) {
			int idx = (i + front) % oa.length;
			na[i] = oa[idx];
		}

		this.data = na;
		this.front = 0;
	}

	// if (this.size == this.data.length) {
	// throw new Exception("queue is full");
	// }

	this.data[(front + size) % this.data.length] = item;
	size++;

}

public int dequeue() throws Exception {
	if (this.size == 0) {
		throw new Exception("queue is empty");

	}

	int rv = this.data[front];
	front = (front + 1) % this.data.length;
	size--;

	return rv;

}

public int getFront() throws Exception {
	if (this.size == 0) {
		throw new Exception("queue is empty");
	}

	int rv = this.data[front];

	return rv;
}

public void display() {
	System.out.println();
	for (int i = 0; i < size; i++) {
		int idx = (i + front) % this.data.length;
		System.out.print(this.data[idx] + " ");
	}
    System.out.print("END");
}


public static int ImpofTime(Queue q,int[] orig_order) throws Exception{ 

// Write your Code here


	int time=0;
	int n=q.size();
	
	for(int i=0 ; i<n ; i++)
	{
		if(q.getFront()==orig_order[i])
		{
			q.dequeue();
			time++;
		}
		else
		{
			while( !q.isEmpty() && q.getFront()!=orig_order[i] )
			{
				int front=q.dequeue();
				q.enqueue(front);
				time++;
			}
			
			q.dequeue();
			time++;
		}
		
	}
	
	return time;




} 


static Scanner scn = new Scanner(System.in);

public static void main(String[] args) throws Exception {

	Queue q = new Queue();

	int n = scn.nextInt();
	int[] process = new int[n];
	for (int i = 0; i < n; i++) {
		q.enqueue(scn.nextInt());
	}
	
	for(int i = 0;i < n;i++){
	
	    process[i] = scn.nextInt();
	}
	
	

	System.out.print(ImpofTime(q,process));

}

}

@Himanshu-Jhawar-2273952536067590,

https://ide.codingblocks.com/s/254659 here is your corrected code. Just change class name from Queue to Main.

Your logic is correct and your code is correct too. Its just that there is a technical glitch in the servers. Hence, just use class name as Main incase this error comes again.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.