Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/17.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
分配中的java.lang.StackOverflower错误_Java_Variable Assignment - Fatal编程技术网

分配中的java.lang.StackOverflower错误

分配中的java.lang.StackOverflower错误,java,variable-assignment,Java,Variable Assignment,当我运行代码时,我得到java.lang.StackOverflowerError 如果有人能告诉我出了什么问题,我将不胜感激 这是我的代码: 我的任务是做一个数独游戏。 奇怪的是,当我调试它时,一切都很顺利,但我不能永远调试它 需要帮助吗( publicstaticvoidmain(字符串[]args){ println(“欢迎来到java数独开始游戏,按enter键”); 扫描仪=新的扫描仪(System.in); scanner.nextLine(); int-AllNum=1000; T

当我运行代码时,我得到java.lang.StackOverflowerError

如果有人能告诉我出了什么问题,我将不胜感激

这是我的代码:

我的任务是做一个数独游戏。 奇怪的是,当我调试它时,一切都很顺利,但我不能永远调试它

需要帮助吗(

publicstaticvoidmain(字符串[]args){
println(“欢迎来到java数独开始游戏,按enter键”);
扫描仪=新的扫描仪(System.in);
scanner.nextLine();
int-AllNum=1000;
TestRow=0;
TestColumn=0;
TheNumUPut=0;
完成=错误;
while(AllNum>99){
AllNum=GivenANum();
if(AllNum>99)NumInPlace(AllNum);}//结束时
数独();
}//端干管
公共静态数独{
如果(TestRow==9&&TestColumn==0)PrintSudoku();
if(finish==false){
if(SolveOneCell()==true){
TestColumn++;
如果(TestColumn==9){TestColumn=0;TestRow++;}
其他的
ReturnToLast();
数独();
}
}//结束数独
2009年9月月14日,2009年9月14日日,该方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方方םש㪙ו
if(IsGiven()==true)返回true;
IncreaseNum();
while(thenumput9){PutZero();返回false;}
如果(UCInput()==true){Put();返回true;}
其他的
TheNumUPut++;}
返回true;
}//结束解算
公共静态布尔ReturnToLast(){
而(1>0){
if(TestColumn==0)
{
TestColumn=8;
TestRow=TestRow-1;
}
else TestColumn=TestColumn-1;
如果(IsGiven()==false)中断;
}
返回true;
}//结束返回到非最后给定值
公共静态给定值()
内壳核;
System.out.println(“请输入给定的数字及其位置?”);
PutANum=reader.nextInt();
回壳核;
}//结束吉文斯
公共静空NumInPlace(室内){/静空NumInPlace(室内){/静空NumInPlace(室内)}静空NumInPlace(室内){/静空NumInPlace(室内)}
行=(n/10)%10;
列=n%10;
给定的数字=(TheNum/100)%10;
董事会[行][列]=给定编号;
给定板[行][列]=给定编号;
}//努明广场尽头
公开静态无效认沽权证
如果(测试行>(-1)和测试列>(-1)){
TheBoard[TestRow][TestColumn]=TheNumUPut;}
}//最后一击
公共静态无效PutZero(){//שם0בתא

if(TestRow很难说,但是您的示例包含一个递归方法,并且大多数
StackOverflowError
s都是由于处理不当的递归造成的


在这种情况下,
finish
可能总是
false
,因此
SolveSudoku();
一旦调用自身足够多次,就会抛出
StackOverFlowError

很难说,但您的示例包含一个递归方法,大多数
StackOverFlowError
都是由于递归处理不当造成的


在这种情况下,
finish
可能总是
false
,因此
SolveSudoku();
一旦调用自身足够多次,就会抛出
StackOverFlowError

很难说,但您的示例包含一个递归方法,大多数
StackOverFlowError
都是由于递归处理不当造成的


在这种情况下,
finish
可能总是
false
,因此
SolveSudoku();
一旦调用自身足够多次,就会抛出
StackOverFlowError

很难说,但您的示例包含一个递归方法,大多数
StackOverFlowError
都是由于递归处理不当造成的


在这种情况下,
finish
可能总是
false
,所以
SolveSudoku();
一旦调用了足够的次数,就会抛出
StackOverFlowError

您可能会导致无休止的递归。
在开始处添加打印输出语句(
System.out.println
) 查看每个方法的名称,并多次查看哪个方法被调用。

这应该能够准确地指出问题所在。

您可能导致了无休止的递归。
在开始处添加打印输出语句(
System.out.println
) 查看每个方法的名称,并多次查看哪个方法被调用。

这应该能够准确地指出问题所在。

您可能导致了无休止的递归。
在开始处添加打印输出语句(
System.out.println
) 查看每个方法的名称,并多次查看哪个方法被调用。

这应该能够准确地指出问题所在。

您可能导致了无休止的递归。
在开始处添加打印输出语句(
System.out.println
) 查看每个方法的名称,并多次查看哪个方法被调用。
这应该可以精确地指出问题所在。

堆栈溢出:

When a program attempts to use more space than is available on the call stack 
(that is, when it attempts to access memory beyond the call stack's bounds, 
which is essentially a buffer overflow), the stack is said to overflow, typically
 resulting in a program crash.
您的递归可能太深,请尝试用while/for循环替换它。:)

堆栈溢出:

When a program attempts to use more space than is available on the call stack 
(that is, when it attempts to access memory beyond the call stack's bounds, 
which is essentially a buffer overflow), the stack is said to overflow, typically
 resulting in a program crash.
您的递归可能太深,请尝试用while/for循环替换它。:)

堆栈溢出:

When a program attempts to use more space than is available on the call stack 
(that is, when it attempts to access memory beyond the call stack's bounds, 
which is essentially a buffer overflow), the stack is said to overflow, typically
 resulting in a program crash.
您的递归可能太深,请尝试用while/for循环替换它。:)

堆栈溢出:

When a program attempts to use more space than is available on the call stack 
(that is, when it attempts to access memory beyond the call stack's bounds, 
which is essentially a buffer overflow), the stack is said to overflow, typically
 resulting in a program crash.
您的递归可能太深,请尝试用while/for循环替换它。:)