【发布时间】:2012-02-05 21:52:26
【问题描述】:
public static void printFib(List<Integer> fib){
JTextArea text = new JTextArea();
for(Iterator<Integer> it = fib.iterator(); it.hasNext(); it.next() ){
text.append(it.toString());
text.append("\n");
}
JOptionPane.showMessageDialog(null,text);
}
如何修改它以让它实际打印数据内容而不是指针地址?
【问题讨论】:
-
试试
JOptionPane.showMessageDialog(null, text.getText());