I was told that using break and continue labels in an OOP language is not OOP programming style. Can you explain in detail why and what is the problem?
The trick was with this label word. I meant labeled break/…
What is the best way to exit/terminate a while loop in Java?
For example, my code is currently as follows:
while(true){
if(obj == null){
// I need to exit here
}
}