if i understand correctly if i delete the loop for(int x=0;x<5;x++)... it will only create only 0 in every elements
i thought that by making the last loop it will only create a random number in a...
Type: Posts; User: mv740
if i understand correctly if i delete the loop for(int x=0;x<5;x++)... it will only create only 0 in every elements
i thought that by making the last loop it will only create a random number in a...
0 0 0 34 45 52 62 77 87
0 0 24 32 43 58 66 73 87
0 16 21 32 46 54 65 77 86
it gave me this but it supposed to have 5 random number per row ...
oh sorry by doesnt compile; i wanted to say it doesnt give the same output when i tried the loop
for(int x=0;x<5;x++)
{
int k = rand.nextInt(9);
array[i][k] = k*10...
import java.util.Scanner;
import java.util.Random;
public class demo
{
public static void main(String[] args)
{
Random rand= new Random(); // being able to use random object