• Post Reply Bookmark Topic Watch Topic
  • New Topic

While Loop Does Not Run!

 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all I'm developing a Swing Project and I have a textarea in which the item names will be entered separating with commas. The code has to check every element and fetch the price of it and calculate the total amount and display it in the text field. But Somehow it does not enter the while Loop? Why?

Here is the code



please tell me where am going wrong?
Thansk in advance
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code does print the message in a console window
Entering While Loop
Exiting While Loop


but does no print Running while loop
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranit Sonawane wrote:The code does print the message in a console window
Entering While Loop
Exiting While Loop


but does no print Running while loop


Isn't that obvious for you that line 16 does not have any data? Check what the ResultSet contains!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!