AIML252 OOP Lab Exam 15/May/2025

AIML252 OOP Lab Exam 15/May/2025

University

25 Qs

quiz-placeholder

Similar activities

OOP_Final Exam

OOP_Final Exam

University

25 Qs

HilosIntro

HilosIntro

University

24 Qs

Java concepts

Java concepts

University

20 Qs

OOPs Fundamentals

OOPs Fundamentals

University

25 Qs

OOP-A2-quiz

OOP-A2-quiz

University

20 Qs

Final Quiz

Final Quiz

University

20 Qs

EJ: SERVLET

EJ: SERVLET

University

21 Qs

Fundamentos JAVA

Fundamentos JAVA

University

20 Qs

AIML252 OOP Lab Exam 15/May/2025

AIML252 OOP Lab Exam 15/May/2025

Assessment

Quiz

Computers

University

Medium

Created by

Aman Kumar

Used 4+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?