Courseiva
Java I/O API and Securing ApplicationshardMultiple SelectObjective-mapped

1Z0-829 Java I/O API and Securing Applications Practice Question

Which two statements are true about FileInputStream? (Select two.)

⚠ Common exam trap

Many candidates confuse FileInputStream with BufferedInputStream or DataInputStream, assuming it supports mark/reset or reads data in a specific byte order, when in fact it is a simple unbuffered byte stream with no such capabilities.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

It extends java.io.InputStream.

FileInputStream directly extends java.io.InputStream, inheriting its abstract methods for reading bytes from a file. Option C is correct because FileInputStream implements java.io.Closeable, which extends AutoCloseable, allowing it to be used in try-with-resources statements for automatic resource management.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • It supports mark() and reset().

    Why it's wrong here

    FileInputStream does not support mark/reset unless wrapped in a BufferedInputStream.

  • It extends java.io.InputStream.

    Why this is correct

    FileInputStream is a subclass of InputStream.

  • It implements java.io.Closeable.

    Why this is correct

    FileInputStream implements Closeable due to inheritance from InputStream.

  • It reads data in big-endian order.

    Why it's wrong here

    Endianness is not a property of FileInputStream.

  • It can be used to read characters.

    Why it's wrong here

    FileInputStream reads raw bytes; character reading requires Reader wrappers.

About these practice questions

Courseiva writes every 1Z0-829 question from scratch — 513 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.