Please let me know.The question doesn't make sense. Either the flush() and the close() are necessary, in which case you don't have any choice but to execute them, or they aren't, in which case you don't. Performance doesn't come into it.
You said " but after close() you can not use writer" it is wrong, ok, I agreeSo you agree.
"Closing a StringWriter has no effect." And question that? : after closing can you use StringWriter which closed ?So you agree but you're still asking questions about it. I can't make any sense of those questions, if they are questions, but either you agree with the Javadoc, in which case you are right, or you don't, in which case you're wrong.