Advanced Java Programming (3160707) MCQs

MCQs of JDBC Programming

Showing 21 to 30 out of 45 Questions
21.
______ do not stop the execution of an application, as exceptions do. They simply alert the user that something did not happen as planned.
(a) SQL Exception
(b) SQL Error
(c) SQL Warning
(d) SQL Alert
Answer:

Option (c)

22.
What is the use of blob, clob datatypes in JDBC?
(a) to store byte array
(b) to store large amount of data into database like images, movie
(c) to store arrived packets like UDP packets
(d) to store char array
Answer:

Option (b)

23.
What does the Class.forName("MyClass") do?
(a) Loads the class MyClass.
(b) Execute any static block code of MyClass.
(c) Returns an instance of MyClass.
(d) All of these
Answer:

Option (d)

24.
If one want to transfer data between a database and an application written in the Java programming language, the JDBC API provides which of these methods?
(a) Methods on the ResultSet class for retrieving SQL SELECT results as Java types.
(b) Methods on the PreparedStatement class for sending Java types as SQL statement parameters.
(c) Methods on the CallableStatement class for retrieving SQL OUT parameters as Java types.
(d) All of these
Answer:

Option (b)

25.
The interface ResultSet has a method, getMetaData(), that returns…
(a) Object
(b) Value
(c) Tuple
(d) Result
Answer:

Option (a)

26.
______ Methods returns a stream that simply provides the raw bytes from the database without any conversion?
(a) getCharacterStream
(b) getBinaryStream
(c) getAsciiStream
(d) getUnicodeStream
Answer:

Option (b)

27.
In ______ ResultSet, the cursor can scroll forwards and backwards, and the result set is sensitive to changes made by others to the database that occur after the result set was created?
(a) ResultSet.TYPE_FORWARD_ONLY
(b) ResultSet.TYPE_SCROLL_SENSITIVE
(c) ResultSet.TYPE_SCROLL_INSENSITIVE
(d) None of the above
Answer:

Option (b)

28.
Where is metadata stored in MySQL?
(a) In the MySQL database metadata
(b) In the MySQL database metasql
(c) In the MySQL database mysql
(d) None of these
Answer:

Option (c)

29.
The JDBC driver type used in either applet or servlet code
(a) Type-1 & Type-2
(b) Type-1 & Type-3
(c) Type-2 & Type-4
(d) Type-3 & Type-4
Answer:

Option (d)

30.
UDA means______.
(a) Unified Data Access
(b) Universal Data Access
(c) Universal Digital Access
(d) Uniform Data Access
Answer:

Option (b)

Showing 21 to 30 out of 45 Questions