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
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
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
Which attribute is used to specify destroy method?
Options
A : destroy
B : destroy-method
C : destruction
D : destruction-method
Which attribute is used to specify initialization method?
Options
A : init
B : init-method
C : initialization
D : initialization-method
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
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
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
Which of the following is not a feature of Beans?
Options
A : Introspection
B : Events
C : Persistence
D : Serialization
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
Annotations more Online Exam Quiz
Application Lifecycle - Ant, Maven and Jenkins