【发布时间】:2021-02-04 03:36:51
【问题描述】:
我有一个 IF ELSE 条件语句块。假设这是我的代码
如何在不更改 A 或 B 的情况下获得代码的 IF ELSE of isTrue? 我试过 return 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){} }
}
【问题讨论】:
标签: java android if-statement conditional-statements