Can some one tell me why the following code :-
class ArrayBasics {
public static void main(String args[])
{
int dynamicMulti[][];
dynamicMulti = new int[3][7];
for (int i = 0; i < dynamicMulti.length; i++)
{
for (int j = 0; j < dynamicMulti.length; j++)
{
int a = Random.nextInt(11);
dynamicMulti[j] = a;
System.out.print(dynamicMulti[j]);
};
System.out.println(""
};
}
}
gives the following error :-
symbol : variable Random
location: class ArrayBasics
int a = Random.nextInt(11);
^
1 error
class ArrayBasics {
public static void main(String args[])
{
int dynamicMulti[][];
dynamicMulti = new int[3][7];
for (int i = 0; i < dynamicMulti.length; i++)
{
for (int j = 0; j < dynamicMulti.length; j++)
{
int a = Random.nextInt(11);
dynamicMulti[j] = a;
System.out.print(dynamicMulti[j]);
};
System.out.println(""
};
}
}
gives the following error :-
symbol : variable Random
location: class ArrayBasics
int a = Random.nextInt(11);
^
1 error