title: How do nested loops in Java work?
body: <p>I am new to Java programming and trying to learn the basics of coding. I want to know how this snippet of code works? </p>
  
  <pre><code>for (int i = 1; i &lt;= 5; i++) {
      for (int j = 1; j &lt;= 10; j++) {
          System.out.print((i * j) + " ");
      }
      System.out.println();
  }
  </code></pre>
  
  <p>I will be really thankful if the programming sherlocks present here can explain me the logic. </p>