I have below code
try
{
FileWriter fileWriter = new FileWriter("C:\\temp\\test.txt");
fileWriter.write("Hi this is sasi This test writing");
fileWriter.append("test");
}
catch(IOException ioException)
{
ioException.printStackTrace();
}
After executing it, the file is created successfully, but the created file is empty.
What is wrong with the code?