aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes mock: java.io.File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "mock: java.io.File" Watch "mock: java.io.File" New topic
Author

mock: java.io.File

adam Lui
Ranch Hand

Joined: Sep 03, 2007
Posts: 186
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?
Jari Timonen
Ranch Hand

Joined: Jan 16, 2004
Posts: 232
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 ]

SCJP 5.0, SCJD URLyBird 1.3.3, OCMJEA 5 (SCEA) Factory Homes
Fu Dong Jia
Ranch Hand

Joined: May 23, 2007
Posts: 131
Hi!adam Lui.
the answer C are correct too!
because from java5 ,the File class can also constructe PrintWriter.


who dare win!<br />SCJP5(94%)|SCWCD5(86%)|SCBCD(100%)|SCEA in progress
Fu Dong Jia
Ranch Hand

Joined: May 23, 2007
Posts: 131
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mock: java.io.File