Skip to content

Instantly share code, notes, and snippets.

@mneko22
Created January 27, 2015 02:05
Show Gist options
  • Save mneko22/ab9c758270e2708218e6 to your computer and use it in GitHub Desktop.
Save mneko22/ab9c758270e2708218e6 to your computer and use it in GitHub Desktop.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
String file = "file.txt";
String str = "3";
double r = Double.parseDouble(str);
try{
PrintWriter pw = new PrintWriter(
new BufferedWriter(new FileWriter(file)));
pw.println(r);
pw.close();
}catch(IOException e){
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment