Oracle Certified Professional Java Se 11 Developer · Free Practice Question Medium

Question 78

Question ID: UKOCP78832


Given code:


F: is accessible for reading/writing and currently doesn't contain any directories/files.


What is the result?

  • A J
  • B A
  • C V
  • D None of the other options
Reveal correct answer

Correct answer: A

Explanation

UKOCP78832:

writeChars(String) is a convenient method to write multiple characters, behind the scenes it writes 4 characters as 8 bytes of data.


readChar() method returns 2 bytes of data, interpreted as char. Return type is char and not int.


'J' is displayed in the output.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need