标签: java nullpointerexception
为什么这行会给我一个NullPointerException?
List<Comment> commentList = commentDAO.getComments();
getComments()方法确实返回了一个List,但是当我单步执行Eclipse中的代码时,该方法甚至不会被调用。
答案 0 :(得分:5)
唯一可能是commentDAO为空