Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

randomize 2d array java

for (int i = 0; i < grid.length; i++) {
    for (int j = 0; j < grid[i].length; j++) {
        grid[i][j] = (int)(Math.random()*10);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #randomize #array #java
ADD COMMENT
Topic
Name
3+3 =