Mastering Java 2026 – 400 Free Practice Questions to Pass the 'Thinking in Java' Exam

Question: 1 / 510

What is the primary distinction between 'MappedByteBuffer' and 'ByteBuffer'?

Only 'ByteBuffer' supports encryption

Only 'MappedByteBuffer' can be used with channels

'MappedByteBuffer' maps a file directly into memory

Explanation 'MappedByteBuffer' maps a file directly into memory, while 'ByteBuffer' does not. Option A is incorrect because both classes support encryption. Option B is incorrect because both can be used with channels. Option D is incorrect because 'ByteBuffer' can be used for file operations as well.

Get further explanation with Examzify DeepDiveBeta

'ByteBuffer' cannot be used for file operations

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy