Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StringBuilder ans = new StringBuilder();
- String output = ans.toString();
- File outfile = new File("example.txt");
- FileWriter fr = null;
- try {
- fr = new FileWriter(file);
- fr.write(output);
- } catch (IOException e) {
- e.printStackTrace();
- }
- try {
- fr.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement