标签:des io os java ar for sp on c
public static void main(String[] args) throws IOException {
BufferedWriter bw = new BufferedWriter(
new FileWriter("C:/Users/宇超/Desktop/rand.txt"));
BufferedReader br = new BufferedReader(
new FileReader("C:/Users/宇超/Desktop/rand.txt"));
for (int i = 0; i < 50; i++) {
bw.write(String.valueOf(Math.random()));
bw.newLine();
}
bw.flush();
bw.close();
String str = null;
while((str=br.readLine())!=null){
System.out.println(str+"\n");
}
br.close();
}
标签:des io os java ar for sp on c
原文地址:http://www.cnblogs.com/oraclespace/p/3989348.html