Explore topic-wise MCQs in Java.

This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your Java knowledge and support exam preparation. Choose a topic below to get started.

1.

java is stored in the disk.

A. true
B. false
C. prints number of bytes in file
D. prints number of characters in the file
Answer» E.
2.

Which of these exception is thrown by close() and read() methods?

A. IOException
B. FileException
C. FileNotFoundException
D. FileInputOutputException
Answer» B. FileException
3.

Which of these exception is thrown in cases when the file specified for writing is not found?

A. IOException
B. FileException
C. FileNotFoundException
D. FileInputException
Answer» D. FileInputException