over write file in java
possible duplicate : Reading a text file in Java
this is my code:
new PrintWriter(new FileOutputStream(new File(fileName), false));
and in other method
these both methods are called in a thread and the filehandle closed when thread exits. Still my file is appended than overwritten.
what is the mistake?