Chain these constructors to create objects to read from a file named "in" and to write to a file named "out".
reader = Place here Place here "in" ));
writer = Place here Place here Place here "out" )));
Constructors
new FileReader(
new PrintReader(
new BufferedReader(
new BufferedWriter(
new FileWriter(
new PrintWriter(
答案:
reader = new BufferedReader( new FileReader( "in" ));
writer = new PrintWriter( new BufferedWriter( new FileWriter( "out" )));
參考:10-5-1 BufferedReader與BufferedWriter類別
沒有留言:
張貼留言