Here is what I'm trying to do:
public class myClass
{
int x;
int y;
}
I have learned c++, so I tried to do this:
myClass [] a = new myClass[5];
for(int i =0; i < 4; i++)
a[i].x = 0;
This doesnt do anything, because all a[i] are null.
I know this is against the basic principal of Java, but there is a product called Alljoyn, which force me to do this, see:
AllJoyn doesnt allow constructor or other methods in the class. Is there any other way to initialize a pure struct?