import java.util.Scanner;
public class NianLing{
public static void main(String [] args){
System.out.print("age=");
Scanner scanner = new Scanner(System.in);
int age = scanner.nextlnt();
System.out.println("您输入的年龄是:" + age);
}
}
请问问题出在哪了?我把程序复制到Eclipse中指出了“The method nextlnt() is undefined for the type Scanner”,我用有道词典翻译了一下“方法nextlnt()是未定义的类型的扫描仪”,请问大神这该怎样修改?Java菜鸟跪求答案
public class NianLing{
public static void main(String [] args){
System.out.print("age=");
Scanner scanner = new Scanner(System.in);
int age = scanner.nextlnt();
System.out.println("您输入的年龄是:" + age);
}
}
请问问题出在哪了?我把程序复制到Eclipse中指出了“The method nextlnt() is undefined for the type Scanner”,我用有道词典翻译了一下“方法nextlnt()是未定义的类型的扫描仪”,请问大神这该怎样修改?Java菜鸟跪求答案