What is the result?

Given the existing destination file, a source file only 1000 bytes long, and the code
fragment: What is the result?

Given the existing destination file, a source file only 1000 bytes long, and the code
fragment: What is the result?

A.
Overrides the content of the destination file with the source file content

B.
Appends the content of the source file to the destination file after a new line

C.
Appends the content of the source file to the destination file without a break in the flow

D.
Throws a runtime exception at line***



Leave a Reply 2

Your email address will not be published. Required fields are marked *


leo yu

leo yu

use new FileoutputStream(new File(myFileName), true),
that way, the data will be appended to the end of old content instead of overriding the old content