First of all, you need a java.io.File instance:
import java.io.File;And here is the storage method:
// ...
File file = new File („[file-path]file-name.file-extension“);
// ...
import java.io.*;
//...
public static void save(File file) {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
writer.close();
}
catch (IOException e) {
e.printStackTrace();
System.out.println("Error on file saving.");
}
}
//...