Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Console.reader.close() misunderstanding

 
Vadim Vararu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Why we can read a line and the program prints if further if we close the reader?
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you're not closing the input stream. Read the javadoc for Console ? Particularly the main description.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic