java 总是提示缺少返回语句 部分源程序如下:

2025-12-16 22:38:40
推荐回答(1个)
回答1:

你的long_judge函数有问题,改成:
public boolean long_judge(int j){
if(j<=0){
return false;
}
if(cas[0][j]<0||cas[0][j]>bar_length||long_judge(j-1)){
return true;
}else{
return false;
}
}