Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Input/Output problem  RSS feed

 
Jdinesh Tiwari
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
This program to take input from keyboard and display on console



but when i comment line of code given below i.e. line no.16 in the program
Than the output screen doesn`t get hold it keeps on running why it is so? please explain

 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jdinesh Tiwari wrote:but when i comment line of code given below i.e. line no.16 in the program
Than the output screen doesn`t get hold it keeps on running why it is so? please explain

Because that's what you told it to do.

What do you think is going to happen with
while ( s != null )
Is s going to suddenly "become" null just because you displayed it?

Winston
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!