java检查条件,然后将其绕过到ELSE
我有一个IF-ELSE条件语句块。假设这是我的代码
如何在不更改A或B的情况下,获得isTrue的IF-ELSE? 我尝试了返回true,但它不会返回,因为它在一个方法中。有什么关键字可以这样做吗
public void test() {
if (text1.equals("") {
//Output error message
} else if (text2.equals("") {
//Ouput error message
.
.
.
} else if (A!= null && (A > B)) {
//GO TO ELSE condition without changing the A or B
} else { if (isTrue){} }
}
共 (0) 个答案