FedespatchVO fedespatch = new FedespatchVO();
List<FedespatchVO> listFedespatch = null;
while (rs.next()) {
System.out.println("I have something in me");
fedespatch.setSerialNumber(rs.getString(1));
fedespatch.setMachine(rs.getString(2));
fedespatch.setHours(rs.getString(3));
fedespatch.setTrigger(rs.getString(4));
fedespatch.setNoticeTime(rs.getString(5));
listFedespatch.add(fedespatch);
}
listFedespatch.add(fedespatch);空指針異常
正在引發空指針異常。我需要返回FedespatchVO類的列表,這是什麼,但getter setter屬性如serialNumber,Machine,NoticeTime等
我的方法是否錯誤?請幫助
謝謝..我是一個白癡..這樣一個愚蠢的錯誤... – user2572739