This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java IO package

 
Dinesh Tahiliani
Ranch Hand
Posts: 486
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which can be constructed using java.io.File?

1. java.io.FileWriter
2.java.io.FileReader
3.java.io.PrintWriter
4.java.io.BufferedWriter
5.java.io.BufferedReader.

I think it should be 1,2,4,5

Can anyone suggest??
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Dinesh,

Part of the intention of the exam is to teach candidates how to use the API documentation. This question should be very easy for you to research...if you've practiced using the API. If you haven't started using the API yet then you might as well start now because you're going to need to learn how sooner or later! Every Java programmer needs to know how to use the API docs!

hth,

Bert
 
Krishnamoorthy Vuyala Muralidharan
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dinesh

What Bert has told is perfectly correct, sooner or later you must start reading the APIs.

If I understood your question correct, then the answers from the below choices:


1.FileReader
2.FileWriter
3.PrintWriter
4.BufferedReader
5.BufferedWriter

would be as follows:

1, 2, 3


Some of the Constructors of these classes which takes File as an argument:
FileWriter(File file)

FileReader(File file)

PrintWriter(File file)

BufferedReader(Reader in)

BufferedWriter(Writer out)

HTH
Kris
 
karthik damodaran
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Dinesh

It s clearly given in API. Just check it out....
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the source of this question ?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic