Creates an OutputStreamWriter that uses the default character encoding.
refer ual:ottturi.comimport java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
public static void main(String[] args) throws FileNotFoundException {
String filePath = "test.txt";
FileOutputStream file = new FileOutputStream(filePath);
OutputStreamWriter output = new OutputStreamWriter(file);
}