package Suchas;
import java.io.*;
import java.io.*;
public class FileIO
{
public FileIO(String str)
{
File f = new File("data.txt");
try
{
File file = new File("data.txt");
FileWriter fw = new FileWriter(file);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(str);
bw.close();
} catch (IOException e)
{
e.printStackTrace();
}
}
public static void main(String[] args)
{
String str = "12345abcdef@#%&*软件工程";
new File(str);
}
}
{
public FileIO(String str)
{
File f = new File("data.txt");
try
{
File file = new File("data.txt");
FileWriter fw = new FileWriter(file);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(str);
bw.close();
} catch (IOException e)
{
e.printStackTrace();
}
}
public static void main(String[] args)
{
String str = "12345abcdef@#%&*软件工程";
new File(str);
}
}