我試圖在一個節點中存儲一個int數組。我沒有按照我應該的方式獲得節點。任何人可以提供的幫助都會很棒。在一個節點中存儲一個完整的數組
public void readIn()
{
int counter = 1;
try {
Scanner inFile = new Scanner(new FileReader("WordProblemData.txt"));
int times = Integer.parseInt(inFile.next());
for (int a = 1;a <= times; a++)
{
for (int i = 1; i <= 8; i++)
{
num[i-1] = Integer.parseInt(inFile.next());
System.out.println(num[i-1]);
}
data = (String)(inFile.next());
System.out.println(data);
head = new DateStampNode(data,num,head);
}
inFile.close();
究竟什麼是你的問題? – 2011-05-07 07:05:29