Search Header Logo

AIML252 OOP Lab Exam 15/May/2025

Authored by Aman Kumar

Computers

University

Used 4+ times

AIML252 OOP Lab Exam 15/May/2025
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Arjun is developing a Java application that needs to store and retrieve user data from a database. What is the purpose of JDBC in Java?

The purpose of JDBC in Java is to enable Java applications to connect to and interact with databases.

To manage memory allocation in Java applications.

To enhance the performance of Java applications.

To provide a graphical user interface for databases.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you connect to an MS Access database using JDBC?

Utilize a PostgreSQL JDBC driver for the connection.

Connect using a MySQL JDBC driver.

Use UCanAccess JDBC driver to connect to MS Access database.

Use ODBC driver to connect to MS Access database.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between Statement and PreparedStatement in JDBC?

Statement is for simple queries; PreparedStatement is for precompiled queries with parameters.

Statement can only execute SELECT queries; PreparedStatement can execute any type of query.

Statement does not support SQL injection prevention; PreparedStatement does.

PreparedStatement is slower than Statement for all queries.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you retrieve data from an Oracle database in Java?

Use JDBC to connect, execute queries, and process ResultSet.

Connect using ODBC and execute stored procedures.

Retrieve data using XML parsing methods.

Use SQL*Plus to run scripts directly on the database.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of the DriverManager class in JDBC?

The DriverManager class is responsible for managing database drivers and establishing connections to the database in JDBC.

The DriverManager class is used for executing SQL queries directly.

The DriverManager class is responsible for managing user permissions in the database.

The DriverManager class handles the formatting of SQL statements.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the concept of multithreading in Java.

Multithreading in Java is the execution of a single thread for better performance.

Multithreading in Java is a method to increase the size of the memory allocation.

Multithreading in Java refers to the use of multiple processes instead of threads.

Multithreading in Java is the concurrent execution of two or more threads, allowing for parallel task execution and efficient resource utilization.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a thread and a process?

A process is an independent execution unit with its own memory, while a thread is a lightweight execution unit that shares memory with other threads in the same process.

A process is always faster than a thread.

Threads cannot communicate with each other.

A process can only run one thread at a time.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?