import java.util.Scanner;
public class Lab6_2{
public static void main(String[] args){
Scanner sc_1 = new Scanner(System.in);
int numnber, i;
System.out.println("Enter an integer between 1 and 10.");
number = sc_1.nextInt();
}
}
此代码说“发现2个错误: 文件:C:\ Users \ danwr \ Downloads \ lab 6_2.java [行:2] 错误:公共类型Lab6_2必须在其自己的文件中定义 文件:C:\ Users \ danwr \ Downloads \ lab 6_2.java [行:7] 错误:数字无法解析为变量”