Dil*_*dra -1 java if-statement break
我想打破一个其他条件,如果它有一个内部if条件,如果内部if条件内部变为如下,请建议我一个方法.
if(condition1=true){
}
else if(condition2=true){
if(condition3=true){
do activity 1;
//I want to break here if condition3 is true, without executing activity 2 & 3
}
do activity 2;
do activity 3;
}
Run Code Online (Sandbox Code Playgroud)
else if(condition2){
if(condition3){
do activity 1;
//I want to break here if condition3 is true, without executing activity 2 & 3
}
else
{
do activity 2;
do activity 3;
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
152 次 |
最近记录: |