public Object test(){ int i = 2; switch(i){ case 0: //todo break; case 1: //todu break; case 2: test01(); if(满足条件){ 停止switch后续的代码,去return } test02(); test03(); //todu break; default: break; } //这里实际情况需要执行好多业务后才返回计算出的数据 return "success"; }
阅读量:21
点赞量:0