Hey guys, saw this thread, and my problem was a bit similar, so I didn't want to clutter the forum with another thread.
I'm trying to figure out how to generate random numbers within the range of -100 to 100. As for the size of the array, it is left up to user input. Could be 10, could be 1000. Here is the actual generating part of my code.
for (i = 0; i < nums; i++)
		{
				
				
			array = (int)(numgen.nextDouble() * MAX);
			System.out.println(array);
			i++;
			array = (int)(numgen.nextDouble() * MIN);
			System.out.println(array);
		}
Where nums is the number of wanted elements for the array, MAX is preset to 100, and MIN is preset to -100. Currently, this will just generate a positive then negative number. I'd like to have it randomly pick a positive/negative number, not alternate. Duplicate numbers are fine. Any tips?