title: Java 2d array counts zeros in column
body: <p>I start learning programming about 4 days ago by myself and iam a lil bit stuck with 2d arrays. I try to challenging myself with tasks, like get from 2d array column with most zeros or atleast  just count zeros, so far  i get this far</p>
  
  <pre><code>public class b {
  
      public static void main(String[] args) {
          int a[][] = new int [5][5];
          int i,j;
          int s = 0;
  
          for(i= 0;i&lt;a.length; i++)
              for(j = 0; j&lt;a[i].length; j++){
                  a[i][j] = (int)(Math.random()*10);
              }
          for(i=0;i&lt;a.length;i++){
              for(j=0;j&lt;a[i].length;j++) {
                  System.out.print(a[i][j] + "\t");   
              }
              System.out.println();
          }
  
          for(j=0;j&lt;a[0].length;j++) {
              for(i=0;i&lt;a.length;i++) {
                  if(a[i][j] &gt;-1 || a[i][j]&lt;1) {
                      s++;
                      System.out.println(s +"\t");            
                      s = 0;
                  }
              }
          }
  
      }       
  }
  </code></pre>
  
  <p>Can somebody explain me why result is always 1 and why it counts columns and rows in one row?</p>