Hey guys, so, I'm creating a GUI Lotto Game for my friend. However, when it comes to compiling the non-GUI part of it, it gives me an error on lines 8 and 10.
The error message is:
"Invalid argument to operation ++/--"
Here is my code:
"
class Random
{
public static void main (String[] args)
{
int[] nums = new int[50];
for(int i = 1; i < 50; 1++) { nums[i] = i; }
for(int i = 1; i < 50; 1++)
{
int r = (int) Math.ceil(Math.random() * 49);
int temp=nums[i];
nums[i]=nums[r];
nums[r]=temp;
}
for (int i = 1; 1 < 7; i++)
{
System.out.print(Integer.toString(nums[i]) + " ");
}
}
}
"
The code on the lines receiving the error is:
"for(int i = 1; i < 50; 1++)"
If it helps, I'm doing this in Java 6!
Thanks,
FalcomerG