我不确定这里的代码有什么问题:
package assigment1;
import java.util.Scanner;
public class A1Q2 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in);
int Level;
int PureDiamonds;
int ImpureDiamonds;
System.out.print("Please enter the game level (1,2,3,4...): ");
Level = input.nextInt();
它说input cannot be resolved
,问题是我有一个旧项目,input.nextInt();
它正在工作。那么有什么问题呢?这让我疯狂