public class allocatedoublearray {

    public static void main(String[] args){

        // in JAVA there are no unsigned's
        int nrows = Integer.parseInt(args[0]) ;
        int ncols = Integer.parseInt(args[1]) ;

        double[][] matrix = new double[nrows][ncols] ;

        for (int i = 0 ; i < nrows ; i++){
            for (int j = 0 ; j < ncols ; j++){
                matrix[i][j] = Math.random() ;
                System.out.print(matrix[i][j] + " ") ;
            }
            System.out.println() ;
        }

    }
}
