Hello!
I am having some practice with arrays, and I am trying to make a program that picks a random suit and then picks a random card from that suit. Here is the code, I am not finished with it yet:
public class RandomSuitandCard { public static void main(String[] arg) { int[] Diamond; int[] Heart; int[] Club; int[] Spade; int i; //position in array int i2 = 0; //number to be out in array Diamond = new int[12]; Heart = new int[12]; Club = new int[12]; Spade = new int[12]; for (i=0, i=12, i++) { i2++; Diamond[i]=i2; } for (i=0, i=12, i++) { i2++; Heart[i]=i2; } for (i=0, i=12, i++) { i2++; Club[i]=i2; } for (i=0, i=12, i++) { i2++; Spade[i]=i2; } } }
The for statements are as follows:
for (i=0, i=12, i++) { i2++; Diamond[i]=i2; }
But the i++ is underlined in red and it says:
Syntax error, insert "; ; ) Statement" to complete ForStatement
This doesn't make any sense! Please help!