1
所以我想用netbeans 8.1在Java中用行和列創建一個基本的2d數組。我的簡單2D數組問題
這是我的代碼:
public static void main(String[]args)
{
int temp = 5;
int temp2 = 10;
for(int i = 0; i < temp2; ++i)
{
for(int k = 0; k < temp; ++k)
{
System.out.println("|_|");
}
System.out.println("\n");
}
}
但由於某些原因,輸出看起來是這樣的:
有人能幫助我瞭解什麼是錯的?
你知道println和print之間的區別嗎? –
哦!非常感謝!我沒有注意到這一點。一定是完成了習慣哈哈。 – badweight
如果您的問題是旋轉的,請將答案標記爲已解決。 –