title: Is it ok if I omit curly braces in Java?
body: <p>I've searched for this, but couldn't find an answer and for whatever reason I was too ashamed to ask professor, due to that feeling when hundreds of people stare at you... </p>
  
  <p>Anyhow, my question is what's the importance of having brackets? Is it OK if I omit them? Example:</p>
  
  <pre><code>for (int i = 0; i &lt; size; i++)  {
     a += b;
  }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>for (int i = 0; i &lt; size; i++)
     a += b;
  </code></pre>
  
  <p>I know both of them will work, but if I omit the brackets (which I tend to do a lot, due to visibility) will that change anything, anything at all? As I said, I know it works, I tested it dozen of times, but now some of my uni assignments are getting larger, and for some reason I have irrational fear that in the long run, this my cause some problems? Is there a reason to fear that?</p>