Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用entry命令编译java时出现的问题_Java_Println - Fatal编程技术网

使用entry命令编译java时出现的问题

使用entry命令编译java时出现的问题,java,println,Java,Println,当我尝试输入以下代码时,使用javac命令时出现语法错误: import java.util.Scanner; public class DemoVariables3 { public static void main(String[] args) { int entry; Scanner keyBoard = new Scanner(System.in); System.out.print("Enter an Integer"); entry = keyBoard.nextInt();

当我尝试输入以下代码时,使用javac命令时出现语法错误:

import java.util.Scanner;

public class DemoVariables3
{


public static void main(String[] args)
{
int entry;
Scanner keyBoard = new Scanner(System.in);
System.out.print("Enter an Integer");
entry = keyBoard.nextInt();
System.out.print("The entry is ");
System.out.println(entry);
System.out.print("Enter another integer ");
anotherEntry = keyBoard.nextInt();
System.out.print("The other entry is");
System.out.println(anotherEntry);
System.out.println(entry + " plus " +
anotherEntry + " is " + (entry + anotherEntry));
System.out.println(entry + " minus " +
anotherEntry + " is " + (entry - anotherEntry));
System.out.println(entry + " times " +
anotherEntry + " is " + (entry * anotherEntry));
System.out.println(entry + " divided by " +
anotherEntry + " is " + (entry / anotherEntry));
System.out.println("The remainder is " +
(entry % anotherEntry));
}
}
这是我的错误消息:

C:\User\Student\Desktop\mywork>javac DemoVariables3.java
DemoVariables3.java:16: error: cannot find symbol
System.out.println(anotherEntry);
                   ^
该错误消息在我的代码中重复了12次;任何帮助都将不胜感激

编辑:我真的不知道如何定义入口,我认为这意味着一旦启动应用程序,最终用户会输入什么内容(我刚刚启动,因此如果我错了,我很抱歉)

编辑2:天哪,我觉得自己很愚蠢,我只是没有为另一次进入声明字符串;非常感谢你为我指出这一点