Assuming the code is run in an environment where it has the necessary permissions, and the folder for the file exists, what will be the output of running this code?
import java.io.PrintWriter;
import java.io.FileNotFoundException;
public class SaveToFile {
public static void main(String[] args) {
String fileName = "testfile.txt";
try {
PrintWriter outputStream = new PrintWriter(fileName);
outputStream.println("Hello, this is a test.");
outputStream.close();
} catch (FileNotFoundException e) {
System.out.println("Error: Cannot create file " + fileName);
}
}
}