由於某些原因,我在用隨機整數填充50數組的主要方法中的這段代碼看起來沒有反應。它只是說Java虛擬機正在運行,但從未停止。爲什麼它不會顯示終端窗口?
int[] randomInts = new int[50];
int i = 0;
int random = (int) (75 - (Math.random() * 126));
while(i < randomInts.length)
{
randomInts[ i ] = (int) (75 - (Math.random() * 125));;
}
while(i < randomInts.length)
{
System.out.println(randomInts[i] + "\t");
}
它看起來像死循環。我在哪裏? – Michas