So I have a PrintWriter as a class variable which is created upon initialization. I want to make sure it gets closed when the Applet closes, but overriding the destroy() method doesn't seem to work (a System.out.println inside the method does not appear).
should I be doing this in the first place, or should I open and close the file each time I need to write to it?
what can I do to make sure the PrintWriter gets closed?
does the PrintWriter even need to be closed?
Thanks in advance