摘要: return 语句可以放在方法的任何一个位置 可以放在while{}也可以放在if{}中,没有限制 如果返回值是void,也可以直接终结函数。 例如: public boolean check(int[] a) { for (int i = 0; i < n; i++) { sum += a[i]; 阅读全文
posted @ 2018-12-28 23:51 deep-thinking 阅读(288) 评论(0) 推荐(0) 编辑