MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Spring
Spring Quiz
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Q.1
JdbcTemplate that takes advantage of Java 1.5 features such as autoboxing, generics, and variable-length arguments to simplify its usage.
a) org.springframework.jdbc.core.JdbcTemplate
b) org.springframework.jdbc.core.simple.SimpleJdbcTemplate
c) org.springframework.jdbc.*
d) none of the mentioned
Q.2
JdbcTemplate require statement parameters to be passed as an object array.
a) True
b) False
Q.3
To use SimpleJdbcTemplate:-
a) instantiate it directly
b) retrieve its instance by extending the SimpleJdbcDaoSupport class
c) all of the mentioned
d) none of the mentioned
Q.4
SimpleJdbcTemplate offers a convenient batch update method in the form of:-
a) Vector
b) Set
c) Map
d) List
Q.5
Method has a warning from the Java compiler because of an unchecked conversion from List to List.
a) findAll()
b) query()
c) update()
d) batchUpdate()
Q.6
The return type of the queryForObject() method will be determined by the class argument (e.g., String.class).
a) True
b) False
Q.7
Named SQL parameters are specified by name (starting with a colon) rather than by position.
a) True
b) False
Q.8
Named parameters are supported only in SimpleJdbcTemplate.
a) True
b) False
Q.9
Implementations of the SqlParameterSource interface:-
a) MapSqlParameterSource
b) BeanPropertySqlParameterSource
c) none of the mentioned
d) all of the mentioned
Q.10
The Spring framework offers a consistent data access exception-handling mechanism for its data access module.
a) True
b) False
Q.11
In your DAO methods, you neither need to surround the code with a try/catch block nor declare throwing an exception in the method signature.
a) True
b) False
Q.12
The direct parent class of DataAccessException is:-
a) RuntimeException
b) NestedRuntimeException
c) Exception
d) Throwable
Q.13
Which concrete exception in the DataAccessException hierarchy should be thrown?
a) errorCode
b) SQLState properties of the caught SQLException
c) All of the mentioned
d) None of the mentioned
Q.14
Error code for The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint.
a) -1
b) 0
c) 23505
d) 1
Q.15
How does the Spring JDBC framework know that stateshould be mapped to DuplicateKeyException?
a) error code
b) SQL state
c) all of the mentioned
d) none of the mentioned
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page