title: compare the sum of characters in a 2d array of strings
body: <p>I want to print from my program the index of the column that has the highest number of characters in a 2d array of strings </p>
  
  <pre><code>public static int columns(String [][] matrix) {
      int numCol = matrix[0].length;
      int indexCol = -1;
      for(int col = 0; col &lt; numCol; col++) {
          int count = 0;
          int countEach = 0;
          for(String[] row : matrix) {
              count += row[col].length();
              if(count &gt; countEach){
                  countEach = count;
              }
  
              System.out.println("count one by one (rows) : " + countEach +" "+"Column :" + col);
          }
          System.out.println();
          System.out.println("SumChar : " + count +" " + "column : "+col + "###############");
      }
      System.out.println("Index of the highest array of characters by columns : ");
      return indexCol;
  }
  </code></pre>
  
  <p>So far, my code looks like this but I'm stuck on how to compare my results, Can somebody kindly give me an explanation on how to proceed? Thank you very much! </p>