Submission issues

Hey Chefs,
I have some trouble submitting my code. I am getting this error
“Main.java:6: class HolesInText is public, should be declared in a file named HolesInText.java
public class HolesInText {
^
1 error”

out of this code:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class HolesInText {

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

	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

	PrintWriter pw = new PrintWriter(System.out);

	int number_testcases = Integer.parseInt(in.readLine());

	for (int i = 0; i < number_testcases; i++) {
		String string = in.readLine();
		char[] char_array = string.toCharArray();
		int counter = 0;

		for (char character : char_array) {
			if (character == 'B') {
				counter += 2;
			} else if (character == 'A' || character == 'D'
					|| character == 'O' || character == 'P'
					|| character == 'Q' || character == 'R') {
				counter++;
			}
		}
		pw.println(counter);
	}
}

}

What should I do to please the system?

Thanks!

i dont know

Well the submission worked when I made the class private.

class name should be public only when class is named Main otherwise it should not be.

Try submitting your code class HolesInText without public keyword.

" I don’t know " . Seriously, if you don’t know then don’t post garbage answers such as this. I would recommend you to delete this answer .

Sorry for that.
can you please help me to make correct this solution.this is giving run time error on code
chef ide.

import java.util.Scanner;
class reverse
{public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
int n,t,r;
t=s.nextInt();
while(t>0)
{
t–;
n=s.nextInt();
int i=0;
while(n>0)
{i=i*10+n%10;
n=n/10;
}
System.out.println(i);
}
}
}