File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Input/Output problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Input/Output problem " Watch "Input/Output problem " New topic
Author

Input/Output problem

Jdinesh Tiwari
Ranch Hand

Joined: Jan 13, 2013
Posts: 35
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

Joined: Mar 17, 2011
Posts: 7545
    
  18

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

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Input/Output problem
 
Similar Threads
travel agent - java writing to file via user input
unable to exit program..
IO problem
I/O: searching an address book text file
Java Programming help needed