• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Printwriter

 
Bhasker Reddy
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I open same printwriter again after I close and flush it to write again?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it very difficulty, to write a test, to find out?
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've seen the same suggestion to a number of questions on this board, "Try it and see".

However, there are things you can do in most languages that are unsupported but still work. Along comes a new SDK release, or just a different execution path, and the same thing doesn't work.

In this case, a closed file can be reused if none of the pieces have been garbage collected. This question is whether you are allowed by the spec to reopen a closed file.

Is there a guarantee in Java that all illegal usages always result in a compile or execution error?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!