When trying to declare a static array in my program I receive a static forward reference error, i'm not sure what I am doing wrong here...
static Square fieldGrid [ ] [ ] = new Square [ ROWSIZE ] [ COLSIZE ];
this is what I am using.
The preferred syntax is:
static Square[][] fieldGrid = new Square [ ROWSIZE ] [ COLSIZE ];
Also, have you declared and initialized ROWSIZE
and COLSIZE
by the time you make this declaration?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With