from row to COLUMN addition
<p>this codes print the sum per ROW....
how to convert it so that it will print the sum per COLUMN ?
thanks,,</p>

<pre><code>public class NewClass{
  public static void main( String[] arg )
  {
int[][] data = 
    { { 1, 2},
      { 2, 2},
      { 1, 2, 4, 5},
      { 2, 2, 4,},
      { 1, 1, 4, 5 },
      { 2, 1, }};



     for ( int row=0; row &lt; data.length; row++)
        {
           int sum = 0;
          for ( int col=0; col &lt; data[row].length; col++)
          {
           sum = sum + data[row][col];
          }
            System.out.print("Sum of Row " + row+" is :  ");
          System.out.println( sum );
        }         
      }
    }     
</code></pre>
