title: how do i convert this for loop to the correct while loop?
body: <p>this code i have typed in below is the original for loop</p>
  <pre><code>  String[][] wordData = {{&quot;study&quot;, &quot;consider&quot;, &quot;examine&quot;, &quot;learn&quot;}, {&quot;ponder&quot;, &quot;read&quot;, &quot;think&quot;, &quot;cogigate&quot;}};
  
  int characterCount = 0;
  for(String[] stringRow : wordData) {
      for(String s : stringRow) {
          characterCount += s.length();
      }
  }
  System.out.println(characterCount);
  </code></pre>
  <p>This is my attempt for the while loop</p>
  <pre><code>int i = 0, j = 0;
  while(i&lt;wordData.length) {
      j=0;
      while(j&lt;wordData[i].length) {
          characterCount += wordData[j].length;
          System.out.print(characterCount);
          j++;
      }
      i++;
  }
  </code></pre>