Advance Java MCQ Questions and Answers

The following quiz “Advance Java MCQ Questions and Answers” provides Multiple Choice Questions (MCQs) related to Advanced Java Programming. These Advanced Java Programming MCQs are also Interviews (campus interview, walk-in interview, company interview), Placement or recruitment, entrance examinations, and competitive examinations oriented. You can practice the below questions to improve your Advanced Java skills. You can click on the View Answer button to check the answer if you needed. Let’s solve this Advance Java MCQ Questions and Answers Quiz. So, Advance Java is also a part of the Java programming language which is generally used for web-based applications and enterprise applications.

You can practice these Advance Java MCQs here and if you want a pdf of Advance Java MCQ Questions And Answers, we will provide a downloading link here soon so please keep visiting here for further modifications. For core java MCQs, visit here.

01. Which of the following is not a kind of exception that is thrown by the JDBC method?

  1. DataRounding
  2. SQL Exception
  3. DataTruncation
  4. SQL Warning

Answer : A
Explanation: None

02. Which of the following option leads to the portability and security of Java?

  1. The applet makes the Java code secure and portable
  2. Bytecode is executed by JVM
  3. Use of exception handling
  4. Dynamic binding between objects

Answer : B
Explanation: As we all know, the output of the Java compiler is bytecode, which leads to the security and portability of the Java code. Bytecode is a highly developed set of instructions that are designed to be executed by the Java runtime system known as Java Virtual Machine (JVM). The Java programs executed by the JVM make the code portable and secure. Because JVM prevents the code from generating its side effects. The Java code is portable, as the same byte code can run on any other platform.

03. When the ejbRemove method encounters a system problem,it should throw_______

  1. javax.ejb.NoSuchEntityException 
  2. java.ejb.RemoveException 
  3. java.ejb.EJBException 
  4. javax.ejb.DuplicateKeyException 

Answer : C
Explanation: java.ejb.EJBException

04. What are the major components of the JDBC?

  1. DriverManager, Statement, and ResultSet
  2. DriverManager, Connection, Statement, and ResultSet
  3. DriverManager, Driver, Connection, and Statement
  4. DriverManager, Driver, Connection, Statement, and ResultSet

Answer : D
Explanation: DriverManager, Driver, Connection, Statement, and ResultSet

05. Which of the following is correct about the Statement class of JDBC?

  1. Statement encapsulates an SQL statement which is passed to the database to be planned and executed
  2. Statement encapsulates an SQL statement which is passed to the database to be parsed and compiled
  3. Both of the mentioned
  4. None of the mentioned

Answer : C
Explanation: Both of the mentioned

06. Which of the following is advantage of using JDBC connection pool?

  1. Better performance
  2. Slow performance
  3. Using more memory
  4. Using less memory

Answer : A
Explanation: Since the JDBC connection takes time to establish. Creating connection at the application start-up and reusing at the time of requirement, helps the performance of the application. Hence, Option A is correct.

07. The method on the result set that tests whether or not there remains at least one unfetched tuple in the result set, is said to be

  1. Fetch method
  2. Next method
  3. Current method
  4. Access method

Answer : B
Explanation: Next method

08. To run a compiled java program the machine must have the following loaded and running

  1. Java virtual machine
  2. Java compiler
  3. Java bytecode
  4. A Web browser

Answer : A
Explanation: JVM

09. Which is responsible for getting a connection to the database?

  1. Connection
  2. Driver
  3. Statement
  4. ResultSet

Answer : B
Explanation: The Driver interface is responsible for getting a connection to the database and the Connection interface is responsible for communication with the database but not making the initial connection. The Statement interface knows how to run the SQL query, and the ResultSet interface knows what was returned by a SELECT query and hence option B is correct.

10. Thin driver is also known as?

  1. Type 3 Driver
  2. Type-2 Driver
  3. Type-4 Driver
  4. Type-1 Driver

Answer : C
Explanation: The JDBC thin driver is a pure Java driver and it is also known as Type-4 Driver.

This Post Has 2 Comments

Leave a Reply