Shubham Semwal wrote:Yes it is overwriting but nothing is written in PrintWriter class so i thought of clarifying here
Really ?
In the Javadoc for every constructor that doesn't have an underlying stream/writer it says
If the file exists then it will be truncated to zero size; otherwise, a new file will be created.