Boolean checking in the 'if' condition

后端 未结 10 1984
陌清茗
陌清茗 2020-12-03 07:40

Which one is better Java coding style?

boolean status = true;
if (!status) {
    //do sth
} else {
    //do sth
}

or:

10条回答
提交回复
热议问题