我是Java和Eclipse的新手,并且一直在观看一些教程,我遵循了1个教程但是我得到了错误“系统无法解析为变量”,然后我决定再次按照它完全相同而且它说了同样的错误...
package java.testing;
import java.util.Scanner;
public class TestingJava
{
public static void main(String[] args)
{
Scanner in=new Scanner(System, in);
int age;
System.out.println("How old are you?");
age=in.next();
if (age >= 21)
System.out.println("You are old enough to drink");
else
System.out.println("You are not old enough to drink");
}
}