This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a query and it can return nulls for each row:
Unfortunately, the program interrupts the methods and returns a NullPointerException, when myQuery returns null. How can I handle that? You can see, I have a NoResultException which also returns null, when no results are found. But it does not prevent from causing a NPE.