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.161Easy

What does the flush() method do in output streams?

Q.162Easy

Which class provides buffering capability to improve I/O performance?

Q.163Easy

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

Q.164Easy

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

Q.165Easy

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

Q.166Easy

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

Q.167Easy

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

Q.168Easy

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

Q.169Easy

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?

Q.170Easy

Which interface in JDBC is used to execute SQL queries and obtain results?

Q.171Easy

What is the correct order of JDBC operations?

Q.172Easy

Which JDBC driver type is platform-independent and does not require native code?

Q.173Easy

What exception is thrown when a database connection cannot be established?

Q.174Easy

Which method is used to retrieve a String value from a ResultSet object?

Q.175Easy

Which JDBC driver type is platform-independent and does not require native code installation?

Q.176Easy

What is the correct syntax to retrieve an integer value from a ResultSet object at column index 2?

Q.177Easy

Which interface represents a single row of data retrieved from a database in JDBC?

Q.178Easy

In JDBC, what is the purpose of the Class.forName() method?

Q.179Easy

What happens when you call rs.next() on a ResultSet after the last row?

Q.180Easy

Which interface in JDBC is used to execute a single SQL statement and return a ResultSet?