Excuse me because I am a beginner in Java …
I want to translate the following code that I have done in C to Java:
#define ROWIMAGES 5
#define COLUMNIMAGES 11
typedef struct {
int posX;
int posY;
int active;
} image;
image images[COLUMNIMAGES][ROWIMAGES];
I’m trying to translate it as follows:
private static final int ROWIMAGES = 5;
private static final int COLUMNIMAGES = 11;
class image{
int posX;
int posY;
int active;
}
image images[COLUMNIMAGES][ROWIMAGES];
The array in Java throws a syntax error, what’s wrong?
Thanks in advance.
1 Answer