Group No. 15 AJP Mcqs.

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Group no. 15 AJP MCQs.

1. Which Packages contains the JDBC classes and Interface?

a) java.util
b) java.swing
c) java.sql
d) java.lang
Ans: c)

2. which type of Driver allows to access multiple database using a single driver.

a) Type 1 driver
b) Type 2 driver
c) Type 3 driver
d) Type 4 driver
Ans:- c)

3. what must be the first character of a database URL?

a) db,
b) db:
c) jdbc,
d) jdbc:
Ans:- d)

4. which is responsible for getting connection to the database?

a) Driver
b) Connection
c) Statement
d) resultSet
Ans:- a)
5. Which type of statement can execute parameterized queries?

a) Prepared statement.
b) Parameterized statement.
c) Parameterized and callable statement.
d) All of the above
Ans:- a)

6. What is, it terms of JDBC , a Data source?

a) Data source is basic service for managing a set of JDBC drivers.


b) Data source is the Java representation of physics data source.
c) Data source is registry print for UNDI-services.
d) Data source is a factory of connection to a physical data source.
Ans:- d)

7. The JDBC-ODBC bridge support multiple concurrent open statement per


connection.

a) True.
b) False.
Ans:- a)

8. The class Java.sql.Timestamp has its super class as:

a) Java.sql.Time
b) Java.util.Date
c) Java.util.Timed
d) None of the above
Ans:- b)

9. State true of false. Is the JDBC-ODBC bridge multithreaded?

a) True
b) False
Ans:- a)

10. In the following JDBC drivers which is known as fully Java driver?

a) Native-API Driver
b) Network Protocol Driver
c) Thin Driver
d) Both B & C
Ans:- d)

11. Which of the following is not an characteristic of JDBC.

a) Support a wide range of portability.


b) Provide support for ODBC using JDBC-ODBC bridge.
c) Using JDBC you can request any type of queries from the database.
d) You can not use JDBC with applet.
Ans:- d)

12. Which interface is used to execute SQL stored procedure.

a) Connection interface
b) Drive interface
c) Callable Statement interface
d) Drive Property info interface
Ans:- c)

13. Which method returns the canonical name of invoking class object.

a) String getname()
b) String getCononical()
c) String getCononicalName()
d) None of the above
Ans:- c)
14. JDBC API is subclass of the ……..

a) Type 5 driver.
b) Java Application.
c) Both.
d) None of the above.
Ans:- b)

15. Which type of driver is used to communicate with existing data-source.

a) Type 1
b) Type 3
c) Type 4
d) None of the above
Ans:- a)

16. Which of the following is called as universal driver.

a) Type 1
b) Type 3
c) Type 4
d) None of the above
Ans:- a)

17. Which of the following convert JDBC calls directly or indirectly into vendor specific
database protocol.

a) JDBC-ODBC bridge driver.


b) Native API driver.
c) Network-protocol driver.
d) None of the above.
Ans:- c)
18. Which driver is preferred if your Java Application is accessing multiple type of
databases at the same time.

a) Type 2
b) Type 4
c) Type 3
d) None of the above
Ans:- c)

19. Which driver is preferred if you are accessing IBM, ORACLE, Sybase.

a) Type 2
b) Type 4
c) Type 3
d) None of the above
Ans:- b)

20. Which method is used to register a driver.

a) DriverManager.registerDriver()
b) DriverManager.register()
c) Driver.registerDriver()
d) None of the above.
Ans:- a)

You might also like