public class One {
  public static void main(String[] args) {
    int n = Integer.parseInt(args[0]), 
      m = Integer.parseInt(args[1]); 
    int[][] values = new int[n][m]; 
    for (int i = 0; i < n; i++) 
      for (int j = 0; j < m; j++) 
        values[i][j] = (int) (Math.random() * 100 - 50) ;
    One.show( values ); // there you go 
  }
  public static void show(int[][] m) { // this is the focus here 
    for (int[] row : m) { 
      for (int value : row) { 
        System.out.printf( "%4d ", value); 
      }
      System.out.println(); 
    }    
  }
}

/* 

Welcome to DrJava. 
> run One 9 3
   4   32  -27 
  13    0   32 
   0  -22  -30 
  36    3  -22 
 -15   20    7 
  12   40   22 
 -41  -31   21 
   8   15   -8 
 -43   -9   10 
> run One 2 5
  42   -3   41  -12    0 
 -46  -46    0   -3   10 
> run One 6 7
 -35   -9  -19   39   39  -38    9 
   5  -30  -14  -34  -44   -9  -49 
 -33  -34  -37   32   45    1   19 
  -5   -4   28  -42  -19  -25    6 
  16  -30   -6  -33  -32   18   44 
  49   19  -44  -42   -5  -27    0 


 */