WorksheetsOnline Quiz On Unit 3&4
Total questions: 10
Worksheet time: 8mins
Which of the following methods is used to establish a connection with the database in JDBC?
connect()
openConnection()
DriverManager.getConnection()
getConnection()
Which of the following is NOT a type of JDBC driver?
Type-1 Driver
Type-2 Driver
Type-3 Driver
Type-5 Driver
What does the executeQuery() method in JDBC do?
Executes SQL update commands like INSERT, UPDATE, or DELETE
Executes a SQL SELECT statement
Closes the connection to the database
Executes any SQL statement, including creating or dropping tables
Which interface is used to retrieve data from the database after executing a query?
Statement
ResultSet
Connection
PreparedStatement
What is the purpose of the RMI Registry?
It acts as a database for storing remote objects.
It manages the remote method invocations.
It allows clients to locate remote objects by name.
It is used to create remote objects.
What does a stub represent in RMI?
It is an actual implementation of a remote object.
It acts as a proxy on the client side to forward requests to the remote object.
It manages the RMI Registry.
It stores the remote object on the server side.
Which method is used by the client to locate and obtain a reference to a remote object from the RMI Registry?
Naming.lookup()
Naming.rebind()
Registry.getReference()
Remote.lookup()
Which of the following is true about Remote Method Invocation (RMI)?
RMI allows communication between objects on the same JVM.
RMI allows communication between objects on different JVMs.
RMI is only used for database communication.
RMI does not require a network connection.
In RMI, which interface is implemented by the server to expose remote methods to the client?
RemoteInterface
Serializable
Remote
RMIObject
In RMI, the server is responsible for:
Binding the remote object to the RMI Registry.
Looking up the remote object from the RMI Registry.
Providing the client with a stub.
Providing the skeleton to the client.
