-1
是否可以使用許多簡單的數組值來聲明多維數組值?如何在java中聲明一個具有兩個或多個單數組的多維數組變量?
char[] alpha1 = {"A","B","C","D","E"};
char[] alpha2 = {"F","G","H","I","J"};
//Is it possible? Give me a solution for this situation:
char[][] alpha = { alpha1[] , alpha2[] };
char [] [] alpha = {alpha1,alpha2};' – Eran
是的,但''a「'不是'char'它是'String'。你想要''''。另外,編譯器已經知道'alpha1'是'char []'數組,所以你不需要這些'[]'在'{..}'裏面。 – Pshemo
你應該試着編譯它並閱讀錯誤... – xenteros