iGET

Java Programming - MCQ Practice Questions

Practice free Java Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

958 questions | 100% Free

Q.21Easy

Which stream class is used to write primitive data types in binary format?

Q.22Easy

Which of the following is NOT a character stream class in Java?

Q.23Easy

Which interface must be implemented to make an object serializable in Java?

Q.24Easy

In Java, what is the primary purpose of the flush() method in output streams?

Q.25Easy

What will be the output of the following code? FileOutputStream fos = new FileOutputStream("test.txt", true); What does the 'true' parameter indicate?

Q.26Easy

Which of the following classes is used to read primitive data types from an input stream in Java?

Q.27Easy

Which interface must a class implement to be eligible for serialization in Java, and what is the significance of implementing it with no abstract methods?