This week's book giveaway is in the Other Open Source APIs forum.
We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Console.reader.close() misunderstanding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Console.reader.close() misunderstanding" Watch "Console.reader.close() misunderstanding" New topic

Console.reader.close() misunderstanding

Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147

Why we can read a line and the program prints if further if we close the reader?

If you think you've done too much, usually it means you've done too few.
Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
Because you're not closing the input stream. Read the javadoc for Console ? Particularly the main description.

I agree. Here's the link:
subject: Console.reader.close() misunderstanding