Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
我在查询数据库的时候为什么抛出这个异常Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException.我只是执行了查询.executeUpdate.没有getXXX.是不是这样就抛出了异常.但是我用getXXX的时候说没有找到项.但是那个项的确在数据库里存在.但我在插入的时候能成功./还有是不是每次执行操作数据库的时候都要关闭操作,但不关闭连接.?

你可能感兴趣的:(Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException)