public static long func(long x){
long iResult = 0;
if(x > 90)
iResult = x-10;
if(0<= x && x <= 90)
iResult = Func(Func(x+11));
return iResult;
}
long iResult = 0;
if(x > 90)
iResult = x-10;
if(0<= x && x <= 90)
iResult = Func(Func(x+11));
return iResult;
}
解决方案 »
- 非贪婪匹配原理?
- 如何使用Eclipse里面的Debug呢?
- 大家帮我看看有关于JApplet的问题?
- 百分求助:java參數中的空格問題
- 用 java JNI 调用一个DLL文件,实现禁止终止进程
- 请问我用了System.arraycopy,要import什么呀?
- 想做一个类似于WINDOWS资源管理器的程序
- org.apache.commons.beanutils.BeanUtils的copyProperties方法怎么copy有问题啊
- 打印问题: 不显示打印设置画面, 直接打印如何实现?
- 请教各位网友有关repaint,update和paint方法的用法!谢谢!
- 问几个问题,看看有没有办法实现,发表你的意见有分!
- 有谁看过<<effective java>>的第48条吗?关于原子操作的问题,对那里说的很是迷惑?
long iResult = 0;
if(x > 90){
iResult = x-10;
}else if(x>=0 && x<= 90){
iResult = func(func(x + 11));
}
return iResult;
}
public static long funC(long x) {
long iResult = 0;
if (x >= 0) {
if (x > 90) {
iResult = x - 10;
}
else {
iResult = funC(funC(x+11));
}
}
return iResult;
}
怎么写更加简洁
if(x >= 0){
return x>90 ? (x-10) : func(func(x+11));
}else {
return 0;
}}