Problem:
Create a two-dimensional array and randomly fill it:
Solution:
public class twoDimentionalArrays { public static void main (String[] args) { int[][] list = new int[10][10]; for (int i =0;i<list.length;i++) { for (int j=0; j<list[0].length;j++) { list[i][j] = (int) (Math.random()*100); } } } }
No comments :
Post a Comment