SaleInfo saleInfoDao=new SaleInfo(date,saleInfo,"k",
rate,employeeId,pay,repay);
System.out.println(saleInfoDao.getEmployeeId());
System.out.println(saleInfoDao.getSaleDate());
System.out.println(saleInfoDao.getRepay());
System.out.println(saleInfoDao.getPay());
System.out.println(saleInfoDao.getRate());
System.out.println(saleInfoDao.getTotalSalePrice());
dao.insert(saleInfoDao);
return saleInfoDao;
我的对象是通过构造函数构造的,想通过 dao.insert(saleInfoDao);插入数据库,返回java.lang.NullPointerException错误,怎么回事
9 回复
添加回复
请先登陆