File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes simple io questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "simple io questions" Watch "simple io questions" New topic
Author

simple io questions

Kendra Payne
Greenhorn

Joined: Oct 17, 2006
Posts: 22
Hi, well here goes, I have my final today and am studying past tests. I was sick and didn't get the answers to the last test and I am not sure I was right so I am asking for a little help to make sure I have the right answers to study. Thanks in advance.
There are 2 programs and 3 questions about each.



5. What does the above program do?
a. Counts the number of lines of data is contained within outagain.txt
b. Counts the number of bytes of data in xanadu.txt
c. Copies the contents of xanadu.txt to outagain.txt
d. none of the above

6. What is a true statement about line 18?
a. The finally clause only excutes if there is an error in the program
b. The finally clause always executes
c. The finally clause causes the program to write the files
d. All the above

7. What kind of file access does the above program use?
a. Sequential file access
b. Random File Access
c. Symetric File Access
d. Asymetrical file access



8. What type of file access does the above program use?
a. Sequential file access
b. Random File Access
c. Symetric File Access
d. Asymetrical file access

9. The above program copies the input file how?
a. One character at a time
b. One Line at a time
c. One byte at a time
d. It doesn�t copy the file

10. The output file of the program above is
a. a text file
b. a binary file
c. a symetric file
d. an asymetric file


This is it for me! I am done with Java after today (I hope I pass).

Thanks for everything
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

So tell us your answers, and/or which ones you really don't know or are unsure about. Then we'll be able to help you out. Teach a man to fish, and all.


[Jess in Action][AskingGoodQuestions]
Kendra Payne
Greenhorn

Joined: Oct 17, 2006
Posts: 22
Okay,
I will just go by number
#5. b
#6. a
#7. a
#8. b
#9. b
#10. b
David McCombs
Ranch Hand

Joined: Oct 17, 2006
Posts: 212
#5 Look up what in.read() returns, and out.write() does.
#6 read up more on finally
#7 yes
#8 look up the io classes in the api
#9 yes-this should help you answer #8
#10 depends, all files are binary of course, but I don't think that is what the question is looking for.


"Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration."- Stan Kelly-Bootle
Kendra Payne
Greenhorn

Joined: Oct 17, 2006
Posts: 22
Thanks,
I appreciate the help, this is the hardest subject I have ever taken. I just can't seem to grasp it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple io questions
 
Similar Threads
If conditional not branching correctly
Please explain me.
File Not Found Exception in IO Stream
Differences between FileInputStream FileReader
Returning array To Method