The easiest way is probably to transpose the matrix and then print each row. Taking an example from the API :
double[][] vals = {{1.,2.,3},{4.,5.,6.},{7.,8.,10.}};
Matrix a = new Matrix(vals);
Matrix aTransposed = a.transpose();
double[][] valsTransposed = aTransposed.getArray();
for(int i = 0; i < valsTransposed.length; i++) {
for(int j = 0; j < valsTransposed[i].length; j++) {
System.out.print( " " + valsTransposed[i][j] );
}
}
duffymo , . , . ( ), .