When I enter the code I get an output like [I@190d11. How can I solve it?
public static void main(String[] args)
{
int N;
N = 10;
System.out.println(getRandom(N));
}
public static int[] getRandom(int N)
{
int i, j, x, y;
Random generator = new Random();
int[] random = new int[N * 2];
x = (2 * N) - 1;
y = -N;
for(i = y; i <= N; i++)
{
for(j = 0; j < N - 1; j++)
random[j] = generator.nextInt(x - y - 1) + y;
}
return random;
}
I think it is related with static but I couldn't solve it.