File writefile=new File("d:\\","3.txt");
try{
boolean b =writefile.createNewFile();
}
catch(Exception e)
{
e.printStackTrace();
}
FileWriter outputfile=new FileWriter(writefile);
BufferedWriter output = new BufferedWriter(outputfile);
String a="woshidafnadnfadj";
output.write(a,0,a.length()); |