Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is the purpose of a BufferedOutputStream? It improves performance by buffer

ID: 1812605 • Letter: W

Question

What is the purpose of a BufferedOutputStream?

      It improves performance by buffering data before writing it to the file.
      It improves performance by buffering data read from the file.
      It adds line numbers to every line that it written.
      It adds line numbers to every line that is read.

Which of the following creates a data stream for reading objects from a file?                                                         

      ObjectInputStream stream = new ObjectInputStream(new FileInputStream(%u201Cmyfile.txt%u201D));
      ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream(%u201Cmyfile.txt%u201D));
      ObjectIOStream stream = new ObjectIOStream(new FileInputStream(%u201Cmyfile.txt%u201D));
      ObjectIOStream stream = new ObjectIOStream(new FileOutputStream(%u201Cmyfile.txt%u201D));

In a Java source file, /** and */                                                       

     mark the start and end of a code block.
      signifies the start and end of a Javadoc comment.
      have no special meaning and are ignored by the JVM.
      None of the above.

Which of the following commands create Javadoc output which includes author and version information, and places the HTML files into a directory called documentation, (Points : 6)                                             

      javadoc %u2013author %u2013version %u2013d documentation *.class
      javadoc %u2013d documentation *.java
      javadoc %u2013version %u2013author %u2013d documentation *.java
      None of the above.

What command is used to bundle a group of related class files and other resources together into a single file?     

      The javac command
      The Javadoc command
      The jar command
      None of the above.

Explanation / Answer

1. It improves performance by buffering data before writing it to the file.

2. ObjectInputStream stream = new ObjectInputStream(new FileInputStream(%u201Cmyfile.txt%u201D));

3.
signifies the start and end of a Javadoc comment.

4.
javadoc %u2013version %u2013author %u2013d documentation *.java

5.
The jar command

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote