J'ai une méthode qui crée un tableau 2D. Je veux retourner ce tableau 2D pour l'utiliser dans une autre classe.Retour 2D Array
public class drawBoxClass {
public String[] drawBox(int boxLength) {
String[][] arrayBox = new String[boxLength][boxLength+1];
//method stuff
return new String[][]arrayBox;
}
}
J'ai essayé googler sur la façon de retourner des tableaux de chaînes 2D, mais je ne comprends pas comment retourner.
Je suis en train de perdre la "dimension tableau".
en double possible de [Java - comment revenir dans une méthode tableau multidimensionnel sans alias ing] (http://stackoverflow.com/questions/20519100/java-how-to-return-in-a-method-multidimensional-array-without-aliasing) – Oghli