Java Random Int randomMatrix(int x, int y)

Here you can find the source of randomMatrix(int x, int y)

Description

random Matrix

License

Open Source License

Declaration

public static int[][] randomMatrix(int x, int y) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int[][] randomMatrix(int x, int y) {
        int[][] matrix = new int[x][y];
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[0].length; j++) {
                matrix[i][j] = (int) (Math.random() * 10);
            }/*from   w  w w  .  j  a va2 s.co m*/
        }
        return matrix;
    }
}

Related

  1. randomIntInInterval(int lower, int upper)
  2. randomIntInRange(int lowerBound, int upperBound)
  3. randomIntRange(int low, int high)
  4. randomIntWithDigits(int digits)
  5. randomKey(int sLen)
  6. randomModuleName(int count)
  7. randomNum(int n)
  8. randomNum(int number)
  9. randomNumber(int lower, int upper)