?
2016-01-27 13:14:33 UTC
if(x<5){
for(int i=0;i<10;i++){
x+=i;
System.out.println(x);
}
}else{
moreStuff;
}
Why?? What is the point? If you are wondering, this is how we were taught:
if(x < 5)
{
for(int i = 0; i < 10; i++)
{
x += i;
System.out.println(x);
}
}
else
{
moreStuff;
}
Now that I look at both of them, I see how much more compressed it is, but still, that shouldn't be the only reason. It makes it harder to read and especially when you are answering someone's question on a forum post, why not make it more readable? It is just easier on the eyes.