public static boolean Test (String temp) throws IOException
{
int flag=0;
for(int i=0;i<temp.length();i++)
{
if ((temp.substring(i,1)=="0"||(temp.substring(i,1)=="1")))
flag+=1;
else
{
System.out.println("You must enter 0 or1!!\n");
temp = bufferedreader.readLine();
break;
}
}
if (flag==temp.length())
return true;
else
Test(temp);
}
编译时老是提示最后一行有缺少返回语句错误.哪位大哥能给个指点?谢谢!!
{
int flag=0;
for(int i=0;i<temp.length();i++)
{
if ((temp.substring(i,1)=="0"||(temp.substring(i,1)=="1")))
flag+=1;
else
{
System.out.println("You must enter 0 or1!!\n");
temp = bufferedreader.readLine();
break;
}
}
if (flag==temp.length())
return true;
else
Test(temp);
}
编译时老是提示最后一行有缺少返回语句错误.哪位大哥能给个指点?谢谢!!
解决方案 »
- 熟悉RMI的朋友,小弟有问题想请教
- 一个Jave程序在英文XP下显示中文为方框,烦请大虾解决!
- hibernate中的多对一问题!急啊!
- 高分求助,熟悉jfree的朋友来
- 如何能让同时运行的2个线程的LOG,记录在同一个文件里??而不是fileName.log和filaName.log1 谢谢!
- 一个JAVA的问题
- UDP问题,立即给分100!!!!!!!!大虾帮忙,我没辙了!!!!!
- 一个关于两个窗体之间的通讯问题
- 安装Resin服务时SRUN命令为何不能在Win2KServer中使用[在线等待]
- 实现接口的类为什么可以和继承父类的子类具有差不多的用法
- 请问这个字符串哪里有问题
- 帮忙写个正则表达式,很简单
return true; else
Test(temp);
return false或者true;万一上面的if不执行就没有return 了