Spring/Spring Mcq Set 11 Sample Test,Sample questions

Question:
 Error code for The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint.

1.-1

2.0

3.23505

4.1

Posted Date:-2022-01-04 08:05:27


Question:
 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.

1.True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-04 08:04:14


Question:
 It is better to implement the PreparedStatementCreator interface and other callback interfaces as inner classes if they are used within one method only.

1.True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:54:42


Question:
 JdbcTemplate that takes advantage of Java 1.5 features such as autoboxing, generics, and variable-length arguments to simplify its usage.

1. JdbcTemplate that takes advantage of Java 1.5 features such as autoboxing, generics, and variable-length arguments to simplify its usage.

2.org.springframework.jdbc.core.simple.SimpleJdbcTemplate

3. org.springframework.jdbc.*

4.none of the mentioned

Posted Date:-2022-01-04 08:00:25


Question:
 To access the database with JDBC:-

1. DAO interface

2.DAO Class

3.DataAccess interface

4.None of the mentioned

Posted Date:-2022-01-04 07:50:43


Question:
 When implementing the PreparedStatementCreator interface, you will get the database connection as the createPreparedStatement() method’s argument.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:54:23


Question:
 Which concrete exception in the DataAccessException hierarchy should be thrown?

1.errorCode

2. SQLState properties of the caught SQLException

3.All of the mentioned

4. none of the mentioned

Posted Date:-2022-01-04 08:05:03


Question:
A set of persistent annotations for you to define mapping metadata.

1.JPA

2.JSR

3.XML

4. none of the mentioned

Posted Date:-2022-01-04 08:09:25


Question:
An ORM framework persists your objects according to the mapping metadata you provide.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:47:56


Question:
Class which declares a number of overloaded update() template methods to control the overall update process.

1.org.springframework.jdbc.core.JdbcTemplate

2.org.springframework.jdbc.core.*

3.org.springframework.jdbc.*

4.none of the mentioned

Posted Date:-2022-01-04 07:53:39


Question:
Class which represents a real-world entity and its instances will be persisted to a database.

1. entity

2. persistent

3. all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 08:07:16


Question:
Data source implementations provided by different vendors and projects.

1. C3PO

2.Apache Commons DBCP

3. All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 07:51:33


Question:
Database Engine which uses low memory consumption and easy configuration.

1.SQL

2.MySQL

3.Apache Derby

4.None of the mentioned

Posted Date:-2022-01-04 07:48:26


Question:
Each entity class to be persisted by an ORM framework, a default constructor with no argument is required.

1. True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-04 08:08:06


Question:
For testing purposes, the client/server mode is more appropriate.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:49:14


Question:
How does the Spring JDBC framework know that state 23505 should be mapped to DuplicateKeyException?

1.error code

2.SQL state

3.all of the mentioned

4. none of the mentioned

Posted Date:-2022-01-04 08:05:52


Question:
If the identifier value is null, this entity will be treated as a new and unsaved entity.

1.True

2.False

3.none

4.None of the mentioned

Posted Date:-2022-01-04 08:08:28


Question:
Implementations of the SqlParameterSource interface:-

1.MapSqlParameterSource

2.BeanPropertySqlParameterSource

3.none of the mentioned

4.All of the mentioned

Posted Date:-2022-01-04 08:03:30


Question:
JDBC Properties for Connecting to the Application Database.

1. Driver Class

2. URL

3.Username

4.All of the mentioned

Posted Date:-2022-01-04 07:50:00


Question:
JdbcTemplate require statement parameters to be passed as an object array.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 08:00:44


Question:
Method has a warning from the Java compiler because of an unchecked conversion from List to List.

1.findAll()

2.query()

3.update()

4.batchUpdate()

Posted Date:-2022-01-04 08:02:04


Question:
Method of RowMapper interface in which, you have to construct the object that represents a row and return it as the method’s return value.

1.mapRow()

2. query()

3.update()

4.None of the mentioned

Posted Date:-2022-01-04 07:57:37


Question:
Method to retrieve the JDBC template.

1.setJdbcTemplate()

2.getTemplate()

3.getJdbc()

4.getJdbcTemplate()

Posted Date:-2022-01-04 07:59:45


Question:
Method which provides list of maps.

1. queryForList()

2. update

3.query()

4.All of the mentioned

Posted Date:-2022-01-04 07:58:27


Question:
Mode which Derby prefers to run in:-

1.embedded

2.client/server

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 07:48:55


Question:
Named parameters are supported only in SimpleJdbcTemplate.

1.True

2. False

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 08:03:04


Question:
Named SQL parameters are specified by name (starting with a colon) rather than by position.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 08:02:46


Question:
ORM which isn’t supported by Spring:-

1.Hibernate

2.JDO

3.TopLink

4.All of the mentioned

Posted Date:-2022-01-04 07:47:06


Question:
PreparedStatementSetter, as its name indicates, create a PreparedStatement object on this connection the parameter as well as binding task of the overall update process.

1.True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:55:06


Question:
RowCallbackHandler purpose is to map a single row of the result set to a customized object.

1. True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:57:08


Question:
RowMapper implementation which can automatically map a row to a new instance of the specified class.

1.BeanPropertyRowMapper

2.BeanPropertyRow

3. All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 07:58:03


Question:
SimpleJdbcTemplate offers a convenient batch update method in the form of:-

1.Vector

2. Set

3.Map

4.List

Posted Date:-2022-01-04 08:01:39


Question:
SingleConnectionDataSource (a DriverManagerDataSource subclass). As its name indicates, this maintains only a single connection.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:52:21


Question:
Spring also provides several convenient but less powerful data source implementations.

1.DriverManagerDataSource

2. DriverManagerData

3.DriverManagerDataAccess

4. DriverManagerDataSourceAccess

Posted Date:-2022-01-04 07:51:58


Question:
Spring JDBC framework offers a convenient class, to simplify your DAO implementation.

1.org.springframework.jdbc.core.support

2. org.springframework.jdbc.core.support.JdbcDaoSupport

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 07:58:54


Question:
Spring supports most of the popular ORM (or data mapper) frameworks.

1. Hibernate

2. JDO

3.JPA

4.All of the mentioned

Posted Date:-2022-01-04 07:46:38


Question:
Standard interface defined by the JDBC specification that factories Connection instances.

1.javax.sql.DataAccess

2.javax.sql.DataSource

3. javax.sql.Data

4.javax.sql.DataSourceAccess

Posted Date:-2022-01-04 07:51:09


Question:
The direct parent class of DataAccessException is:-

1.RuntimeException

2.NestedRuntimeException

3.Exception

4.Throwable

Posted Date:-2022-01-04 08:04:37


Question:
The general purpose of the Data Access Object (DAO) pattern is to avoid these logic related problems by separating data access logic from business logic and presentation logic.

1.True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:50:17


Question:
The JdbcTemplate class declares a number of overloaded query() template methods to control the overall query process.

1. True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:56:20


Question:
The JdbcTemplate class offers template method for batch update operations.

1.batchUpdate()

2.update()

3. all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 07:55:33


Question:
The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 07:59:12


Question:
The primary interface that allows you to process the current row of the result set

1.PreparedStatementSetter

2.PreparedStatementCreator

3.PreparedStatementCreator

4.All of the mentioned

Posted Date:-2022-01-04 07:56:48


Question:
The return type of the queryForObject() method will be determined by the class argument (e.g., String.class).

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-04 08:02:25


Question:
The Spring framework offers a consistent data access exception-handling mechanism for its data access module.

1. True

2. False

3.none

4.None of the mentioned

Posted Date:-2022-01-04 08:03:53


Question:
To allow the identifier to be null, you should choose a primitive wrapper type:-

1. java.lang.Integer

2. java.lang.Long

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 08:08:56


Question:
To start the Derby server in the client/server mode.

1.startNetworkServer java file

2.startNetworkServer script

3.startNetwork script

4.All of the mentioned

Posted Date:-2022-01-04 07:49:38


Question:
To use SimpleJdbcTemplate:-

1.instantiate it directly

2.retrieve its instance by extending the SimpleJdbcDaoSupport class

3. all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 08:01:14


Question:
Which DataSource is not stable in MultiThreaded Environment?

1.DriverManagerDataSource

2. SingleConnectionDataSource

3.All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-04 07:52:50


Question:
You implement this interface to override the statement creation task.

1.PreparedStatement

2.PreparedStatementCreator

3.PreparedCreator

4.None of the mentioned

Posted Date:-2022-01-04 07:54:04


More MCQS

  1. Spring Mcq Set 1
  2. Spring Mcq Set 2
  3. Spring Mcq Set 3
  4. Spring Mcq Set 4
  5. Spring Mcq Set 5
  6. Spring Mcq Set 6
  7. Spring Mcq Set 7
  8. Spring Mcq Set 8
  9. Spring Mcq Set 9
  10. Spring Mcq Set 10
  11. Spring Mcq Set 11
  12. Spring Mcq Set 12
  13. Spring Mcq Set 13
  14. Spring Mcq Set 14
  15. Spring Mcq Set 15
  16. Spring Mcq Set 16
  17. Spring Mcq Set 17
  18. Spring Mcq Set 18
  19. Spring Mcq Set 19
  20. Spring Mcq Questions
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!