經安全檢測,此網站為安全網站,請放心前往原始網址!

How do I exit a while loop in Java? - Stack Overflow

while(true){if(obj == null){// I need to exit here}} ... Use break : while (true) { .... if ( obj == null) { break; } .... } However, if your code looks exactly like you have specified ...

stackoverflow.com

網址安全性掃描由 google 提供