Whats the nicest way to fill up following array:
From main:
String[][] data = new String[x][3];
for(int a = 0; a < x; a++){
data[a] = someFunction();
}
Function I am using..:
public String[] someFunction(){
String[] out = new String[3];
return out;
}
Is it possible to do something like this? Or do I have to fill it with for-loop?
With this code im getting error "non-static method someFunction() cannot be refferenced from static content ---"(netbeans) on line data[a] = someFunction();