- package com.sinosuperman.driver;
-
- import java.io.BufferedWriter;
- import java.io.File;
- import java.io.FileWriter;
- import java.io.IOException;
- import java.io.PrintWriter;
-
- public class MainBench {
- public static void main(String[] args) throws IOException {
- MyStream stream = new MyStream("temp/test.txt");
- }
- }
-
- class MyStream {
- public MyStream(String pathName) throws IOException {
- PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(new File(pathName))));
- out.println("I"m Michael C. Zhong");
- out.println("Education Background:");
- out.println(" 2006-2011, University of Science and Technology of China.");
- out.print(" Computer Science and Technology, Bachelor Degree.");
- out.close();
- }
- }
|