Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SQLException

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a question about a code snippet.
SQLWarning warnings=connection.getWarnings();
while(warnings!=null){
System.err.println(connection.getWarnings());//commented
warnings=warnings.getNextWarning();
}
On the commented line, in order to get all the subsequent SQLWarning, shouldn't it be
System.err.println(warnings);
instead?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!