if cdc++;else b=ad;在java中else可以用什么替换
在Java中,可以使用以下替代语句:
- Ternary operator:
c = (c < d) ? c+1 : c;
- If statement without else:
if (c < d) { c++; } b = a[d];
原文地址: http://www.cveoy.top/t/topic/fbNZ 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
在Java中,可以使用以下替代语句:
c = (c < d) ? c+1 : c;
if (c < d) { c++; } b = a[d];
原文地址: http://www.cveoy.top/t/topic/fbNZ 著作权归作者所有。请勿转载和采集!