Download Core-Spring (based on Spring 3.2).CoreSpringV3.2.Test4Prep.2020-01-15.57q.vcex

Vendor: SpringSource
Exam Code: CoreSpringV3.2
Exam Name: Core-Spring (based on Spring 3.2)
Date: Jan 15, 2020
File Size: 32 KB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Demo Questions

Question 1
Select which statement is true with respect to constructor injection with Spring (select one)
  1. Multiple parameters can be dependency injected into a constructor
  2. Using XML configuration, the constructor-arg element may be omitted if the constructor requires a single parameter
  3. One single bean cannot mix constructor injection with setter injection
  4. All of the above
Correct answer: A
Question 2
Consider the following complete configuration sample:
<bean class="rewards.internal.RewardNetworkImpl"> 
        <property name="accountRepository" ref="accountRepository"/> 
</bean> 
<bean class="rewards.internal.account.JdbcAccountRepository"/> 
Which of the following statements is true? (Select one)
  1. This configuration is correct
  2. This configuration is not valid because the first bean should have an id. Its value should be "rewardNetwork".
  3. This configuration is not valid because the second bean should have an id. Its value should be "accountRepository".
  4. Both (b) and (c)
Correct answer: C
Question 3
Which of the following statements about the FactoryBean interface is NOT true? (select one)
  1. A FactoryBean can be used to generate Spring beans of any type
  2. The Spring configuration <property name="someValue" ref="myFactoryBeanImpl"/> will ALWAYS inject the instance of the FactoryBean implementation
  3. FactoryBean is a Spring interface
  4. Factory objects used in Spring do not necessarily have to implement the FactoryBean interface
Correct answer: B
Question 4
Which of the following statements is NOT true with respect to Spring's ApplicationContext? (select one)
  1. The ApplicationContext eagerly instantiates all singleton beans by default
  2. There are many different implementation classes which all implement the ApplicationContext interface
  3. When available, the close() method will cause any registered bean destruction code to be invoked
  4. In a JUnit test using Spring support (with @ContextConfiguration annotation), it is necessary to close the ApplicationContext manually
Correct answer: D
Question 5
Select which of the following configuration tasks would be implemented using Spring's XML "context" namespace (select one or several answers)
  1. Enabling component-scanning
  2. Enabling the use of the @Transactional annotation
  3. Enabling the use of the @Required, @PreDestroy and @PostConstruct annotations
  4. Enabling the use of the @Around annotation
Correct answer: AC
Question 6
Which of the following statements about the @PostConstruct annotation is NOT true? (select one)
  1. It is a JSR-250 standard Java annotation
  2. There are no restrictions on method name or visibility of a method which can be annotated with @PostConstruct
  3. It can be enabled using the <context:annotation-config /> tag
  4. It is called before setter injection
Correct answer: D
Question 7
Using Spring AOP, which of the following Spring annotations cause behavior to be added (select one)
  1. @Secured
  2. @Transactional
  3. Both a and b
  4. Neither a or b
Correct answer: C
Question 8
Two beans of type MyBean are defined in the ApplicationContext with singleton scope, with ids "myBean1" and "myBean2". The getBean() method is called once for each bean. Which statement is true about the two references returned? (Select one)
  1. The two references refer to different instances of the same type
  2. Both references refer to the same bean instance
  3. One of the references will be null
  4. A RuntimeException will be thrown when the ApplicationContext is initialized
Correct answer: A
Question 9
What is the primary purpose of bean definition inheritance? (Select one or several answers)
  1. To configure Java class inheritance dynamically within the XML bean definition file
  2. To reduce the amount of configuration required by inheriting properties from other bean definitions
  3. To allow Spring beans to be created on the fly from classes declared as abstract
  4. To simplify configuration by allowing multiple properties files to be loaded in a hierarchy to specify bean properties
Correct answer: B
Question 10
What is true regarding bean definition inheritance?
  1. Parent bean definitions should always be abstract
  2. Parent bean definitions may be abstract
  3. The class attribute can be declared in a parent bean definition
  4. It is not useful to declare an id for a parent bean definition
Correct answer: BC
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!