Inside a for-loop, should I move the break condition into the condition field if possible? – softwareengineering.stackexchange.com

Sometimes I need for loops which needs a break like that: for(int i=0;i<array.length;i++){ //some other code if(condition){ break; } } I feel uncomfortable to if(condition){ ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Inside a for-loop, should I move the break condition into the condition field if possible? – softwareengineering.stackexchange.com"