Java Programming - MCQ Practice Questions
Java interviews and campus tests lean heavily on object oriented behaviour rather than API recall. This set covers inheritance and polymorphism, interfaces and abstract classes, the collections framework, exception handling, multithreading, string handling, and JVM basics such as garbage collection. Output based questions are included because they expose the gaps that theory questions hide.
951 questions | 100% Free
Which of the following is NOT a character stream class in Java?
Which interface must be implemented to make an object serializable in Java?
In Java, what is the primary purpose of the flush() method in output streams?
What will be the output of the following code?
FileOutputStream fos = new FileOutputStream("test.txt", true);
What does the 'true' parameter indicate?
Which of the following classes is used to read primitive data types from an input stream in Java?
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?