Forums Register Login

mock: java.io.File

+Pie Number of slices to send: Send
which can be constructed using an instance of java.io.File?
A. java.io.FileWriter
B. java.io.BufferedWriter
c. java.io.PrintWriter
D. java.io.FileReader
E. java.io.BufferedReader

i think the answers are A and D. correct?
+Pie Number of slices to send: Send
You can read the answers from API: http://java.sun.com/j2se/1.5.0/docs/api/

The reason why i'm not giving straight answer is that YOU NEED TO KNOW HOW TO READ API.

[ November 12, 2007: Message edited by: Jari Timonen ]
[ November 12, 2007: Message edited by: Jari Timonen ]
+Pie Number of slices to send: Send
Hi!adam Lui.
the answer C are correct too!
because from java5 ,the File class can also constructe PrintWriter.
+Pie Number of slices to send: Send
Constructor Summary
PrintWriter(File file)
Creates a new PrintWriter, without automatic line flushing, with the specified file.
PrintWriter(File file, String csn)
Creates a new PrintWriter, without automatic line flushing, with the specified file and charset.
PrintWriter(OutputStream out)
Create a new PrintWriter, without automatic line flushing, from an existing OutputStream.
PrintWriter(OutputStream out, boolean autoFlush)
Create a new PrintWriter from an existing OutputStream.
PrintWriter(String fileName)
Creates a new PrintWriter, without automatic line flushing, with the specified file name.
PrintWriter(String fileName, String csn)
Creates a new PrintWriter, without automatic line flushing, with the specified file name and charset.
PrintWriter(Writer out)
Create a new PrintWriter, without automatic line flushing.
PrintWriter(Writer out, boolean autoFlush)
Create a new PrintWriter.
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1743 times.
Similar Threads
Create Directory on Server after making a socket connection ?
How to cut a file from one location
How well to list the content of a directory in java?
Program to check whehter a file is read-only / write
Remove file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:15:17.