Java Infra或precheck错误:未找到名为的类

Java Infra或precheck错误:未找到名为的类,java,error-handling,Java,Error Handling,我不明白为什么会出现这个错误。 有人能解释一下这个错误的含义吗?导致此错误的原因以及解决方法 错误: Infra或precheck错误:未找到名为的类 这是我的密码: import java.util.*; class TestClass { public static void main(String args[] ) throws Exception { Scanner sc = new Scanner(System.in); int n= sc.n

我不明白为什么会出现这个错误。
有人能解释一下这个错误的含义吗?导致此错误的原因以及解决方法

错误:

Infra或precheck错误:未找到名为的类

这是我的密码:

import java.util.*;

class TestClass {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n= sc.nextInt();
        String str;
        String tstr;
        str=sc.nextLine();
        tstr=sc.nextLine();

        char [] s = new char[n];
        char [] t = new char[n];
        for(int i=0;i<str.length();i++){
            s[i]=str.charAt(i);
        }
        for(int i=0;i<tstr.length();i++){
            t[i]=tstr.charAt(i);

        }
        int count=0;
        for(int i=0;i<n;i++){

                if(((s[i]+13)%90)>t[i]){
                    count=count+t[i]-s[i];

                }
                else if(((s[i]+13)%90)<t[i]){
                    count=count+t[i]-s[i]+13;

                }

        }
        System.out.println(count);
    }
}
import java.util.*;
类TestClass{
公共静态void main(字符串args[])引发异常{
扫描仪sc=新的扫描仪(System.in);
int n=sc.nextInt();
字符串str;
字符串tstr;
str=sc.nextLine();
tstr=sc.nextLine();
char[]s=新字符[n];
char[]t=新字符[n];

对于(inti=0;i您可能正在黑客帝国进行coderena战斗。 我在使用java版本(1.8.1)时也遇到了同样的错误
将其更改为1.7.1,您就可以开始了

您可以编译2或3次..然后它将自动编译,如果在提交代码时再次出现“Infra或precheck错误:找不到名称为的类”出现此消息,然后再次提交2或3次。它肯定会解决您的问题。

在我的情况下,我的一种方法错过了一个开头括号。

欢迎来到SO Aastha Gupta!请详细说明您的答案。为什么它会在第二次或第三次有效,而不是第一次有效?祝您愉快,甚至我的朋友也建议我这样做T