Java Beans Online Exam Quiz

Java Beans GK Quiz. Question and Answers related to Java Beans. MCQ (Multiple Choice Questions with answers about Java Beans

How to specify autowiring by name?

Options

A : @Qualifier

B : @Type

C : @Constructor

D : @Name

View Answer

What does setAutoCommit(false) do?

Options

A : commits transaction after each query

B : explicitly commits transaction

C : does not commit transaction automatically after each query

D : never commits transaction

View Answer

What is the attribute of java bean to specify scope of bean to have single instance per Spring IOC?

Options

A : prototype

B : singleton

C : request

D : session

View Answer

Which attribute is used to specify destroy method?

Options

A : destroy

B : destroy-method

C : destruction

D : destruction-method

View Answer

Which attribute is used to specify initialization method?

Options

A : init

B : init-method

C : initialization

D : initialization-method

View Answer

Which of the following contains both date and time?

Options

A : java.io.date

B : java.sql.date

C : java.util.date

D : java.util.dateTime

View Answer

Which of the following is advantage of using JDBC connection pool?

Options

A : Slow performance

B : Using more memory

C : Using less memory

D : Better performance

View Answer

Which of the following is advantage of using PreparedStatement in Java?

Options

A : Slow performance

B : Encourages SQL injection

C : Prevents SQL injection

D : More memory usage

View Answer

Which of the following is not a feature of Beans?

Options

A : Introspection

B : Events

C : Persistence

D : Serialization

View Answer

Which one of the following contains date information?

Options

A : java.sql.TimeStamp

B : java.sql.Time

C : java.io.Time

D : java.io.TimeStamp

View Answer

Annotations more Online Exam Quiz

Application Lifecycle - Ant, Maven and Jenkins

AutoCloseable, Closeable and Flushable Interfaces

Client and Server

Debugging in Eclipse

Design Patterns

JDBC

JSP

JSP Elements

Reflection API

Servlet