This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
We prefer a linenumber, and a mark, where this line is in the source-code, because we don't like counting to 297, and small differences in the layout may confuse our counting.
... but I found it without that.
You declare 'Statement statement' and 'Connection connection' in your class. While initialising, you declare a new 'Statement statement' and 'Connection connection' in main, only locally visible, and hiding the class-attribut. Later the local variable is out of scope - invalid, invisible, - and the class-member is used. Which is null - has never been initialised. [ July 28, 2004: Message edited by: Stefan Wagner ]