foreach之后輸出null
for (Book book :handler.getBookList() ) {
System.out.println(book.getId());
System.out.println(book.getName());
System.out.println(book.getAuthor());
System.out.println(book.getYear());
System.out.println(book.getPrice());
System.out.println(book.getLanguage());
System.out.println("_______finish______");
}
1
null
null
null
null
null
_______finish______
2
null
null
null
null
null
_______finish______
2018-01-26
我也是這個問題,沒注意到已經定義了全局value了。。。Thank?you
2015-09-13
把characters()方法中的 String ?value = new String(ch, start, length);中的String去掉,寫成?value = new String(ch, start, length);就可以了
2015-01-17
首先你要確定 ?handler.getBookList() 是有值的啊,不然怎么賦值給你的book。 book是空的,book里面的屬性能有值嗎?
2015-01-06
眼睛瞪了一上午花眼了,在characters()方法里沒有傳值value,而是定義了一個String value,所以傳出來的都是null.
~~~~(>_<)~~~~?