if then 语句怎么写才只执行一次

2025-03-23 10:43:29
推荐回答(1个)
回答1:

boolean flag = true;
if(flag){
//doSomeThings

flag = false;
}