I was coding midway when I find out that netbeans give me an error regarding the below code:
String [][]table={getRowArray()};
//getRowArray() will return me a 1D string array
Is there any way to store the 1D array returned by my method into the 2D array directly instead of using a for loop?
Thanks for any help rendered!
For starters – yes, it is possible to do that.
Double check the error you’re getting. Make certain that the return type of
getRowArray()is trulyString[].