10 Mostly asked Spring interview questions in Accenture

This is a part of the article I wrote on Accenture interview questions and answers. This part is basically on the frequently asked Spring related questions in Accenture job interviews.

Spring Framework is a type of application framework for Java platform. It is an open source framework popularly used by Java developers for various added features. The top questions asked in this subject in Accenture are enlisted below with suitable answers.

spring interview questions

  1. What are the advantages of using Spring Framework?
  • The version of Spring Framework is light like feather and weighs 2MB only.
  • The Inversion of Control (IOC) is very useful for loose coupling.
  • Capable to separate application based business logic from the system based services by supporting Aspect oriented Programming (AOP).
  • Efficiently enables a user to manage and contain the configuration and life cycle of the objects applied.
  • Provides an efficient alternative to traditional web frameworks.
  1. What is the meaning of Dependency Injection?

This design pattern allows a user to eradicate the coded dependencies and make the entire application maintainable, extendable and coupled loosely. In fact the dependency resolution can be moved from the compile time format to run time format.

  1. What is Spring bean?

Any kind of normal class in java which is initialized by Inversion of Control (IoC) in Spring is known as Spring Bean. Spring IoC Container is responsible to manage bean scopes, life cycle and dependency injection in the beans.

  1. What do you mean by ViewResolver?

The ViewResolver is an implementation which uses names for resolving view pages. It is configured in configuration file of Spring bean.

  1. How Dependency Injection can be implemented in Spring Framework?

It can be easily implemented by using Annotation based as well as Spring XML configuration.

  1. What is Aspect Oriented Programming?

Aspect Oriented Programming allows a user to implement modularity configuration by cutting through different methods of classes. These cross cutting performances is not possible in object oriented techniques of programming.

  1. What is Advice?

The action where a specific join point is taken into action when a particular point cut is matched in an application is called Advice.

  1. What is pointcut?

The regular expressions that match join points in order to determine which advice is to be used or not is called point cut. There are different expressions used. AspectJ is used by Spring framework.

  1. What does Inner Beans stands in Spring?

When a bean is executed for a single property then the advice signifies it as Inner Bean. It is supported in constructor injection as ‘constructor-arg’ and setter injection as ‘property’.

  1. How Java collection can be injected in Spring framework?

In the Spring Framework there are four different genres of collection.

  • <list>

This collection is used to wire that is injecting an entire list of values and also allowing duplicates.

  • <set>

This collection also helps in wiring a set of different values but without including any duplicity.

  • <map>

This is a unique type of collection that varies from other collections. It allows a user to incorporate a set of name and value pairs in which the values and names can be of different types.

  • <props>

This is a type of injection that allows a user to incorporate name and value pairs which are strings.

You can find more about Spring interview questions here.

Leave a Reply

Your email address will not be published. Required fields are marked *