• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

simple io questions

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Kendra Payne
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay,
I will just go by number
#5. b
#6. a
#7. a
#8. b
#9. b
#10. b
 
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
#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.
 
Kendra Payne
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks,
I appreciate the help, this is the hardest subject I have ever taken. I just can't seem to grasp it.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic