Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

51.

What Is The Better Method Of Using Jdbc In Spring?

Answer»

If JDBC is USED with the template class CALLED JdbcTemplate, it gives a BETTER performance.

If JDBC is used with the template class called JdbcTemplate, it gives a better performance.

52.

What Are Orm Integration Modules?

Answer»

Object/relational mapping (ORM) tool is supported by Spring over STRAIGHT JDBC by implementing the ORM module. Spring can join VARIOUS important ORM frameworks, including JDO, iBATIS SQL MAPS and Hibernate.

Object/relational mapping (ORM) tool is supported by Spring over straight JDBC by implementing the ORM module. Spring can join various important ORM frameworks, including JDO, iBATIS SQL Maps and Hibernate.

53.

What Is The Web Module?

Answer»

The web MODULE enables the creation of a web application without XML. The web.xml FILE needs to be configured for USING the web module.

The web module enables the creation of a web application without XML. The web.xml file needs to be configured for using the web module.

54.

What Is Dataaccessexception?

Answer»

DataAccessException is a RuntimeException. It is an Unchecked EXCEPTION. The USER cannot be forced to HANDLE these KINDS of exceptions.

DataAccessException is a RuntimeException. It is an Unchecked Exception. The user cannot be forced to handle these kinds of exceptions.

55.

What Is Cross Cutting Concern And Concern In Spring Aop?

Answer»

Cross cutting concern: It is a concern which is APPLICABLE THROUGHOUT the application and it affects the entire application. E.g SECURITY, LOGGING and data transfer are the concerns which are NEEDED in almost every module of an application.
Concern: Concern is a behavior that we want to have in a module of an application. Issues in which we are interested defines our concern.

Cross cutting concern: It is a concern which is applicable throughout the application and it affects the entire application. E.g Security, logging and data transfer are the concerns which are needed in almost every module of an application.
Concern: Concern is a behavior that we want to have in a module of an application. Issues in which we are interested defines our concern.

56.

Explain The Term Proxy?

Answer»

The term proxy REFERS to an OBJECT which is PRODUCED the APPLICATION of an advice to the target object.

 

The term proxy refers to an object which is produced the application of an advice to the target object.

 

57.

What Is Difference Between Singleton And Prototype Bean?

Answer»

Singleton BEAN – Single bean DEFINITION to a single object INSTANCE per Spring IOC CONTAINER
Prototype Bean – Single bean definition to any number of object instances per Spring IOC Container

Singleton Bean – Single bean definition to a single object instance per Spring IOC container
Prototype Bean – Single bean definition to any number of object instances per Spring IOC Container

58.

What Is A Pointcut?

Answer»

POINTCUT is USED to ALLOW where the ADVICE can be APPLIED.

Pointcut is used to allow where the advice can be applied.

59.

What Is An Aspect?

Answer»

Aspect is also called as LOGGING which is required THROUGHOUT the application. Logging or aspect is a cross cutting FUNCTIONALITY in an application using AOP.

 

Aspect is also called as logging which is required throughout the application. Logging or aspect is a cross cutting functionality in an application using AOP.

 

60.

What Is A Joinpoint?

Answer»

The point where an aspect can be INTRODUCED in the APPLICATION is known as a joinpoint. This point could be a FIELD being modified, a method being called or even an exception being thrown. At these points, the new aspect’s code can be added to INTRODUCE a new behavior to the application.
Aspect code can be inserted at this point into normal flow of application to change the CURRENT behavior.

The point where an aspect can be introduced in the application is known as a joinpoint. This point could be a field being modified, a method being called or even an exception being thrown. At these points, the new aspect’s code can be added to introduce a new behavior to the application.
Aspect code can be inserted at this point into normal flow of application to change the current behavior.

61.

What Is Called An Advice?

Answer»

Advice will tell APPLICATION on new behavior and it is the implementation of an aspect. It is INSERTED into an application at the joinpoint.
Advice is the implementation of an aspect. It is something LIKE TELLING your application of a new behavior. Generally, the advice is inserted into an application at joinpoints.

Advice will tell application on new behavior and it is the implementation of an aspect. It is inserted into an application at the joinpoint.
Advice is the implementation of an aspect. It is something like telling your application of a new behavior. Generally, the advice is inserted into an application at joinpoints.

62.

Write About The Different Types Of Listener Related Events?

Answer»

The DIFFERENT types of events RELATED to listeners are:

  • ContextRefreshedEvent – This gets called when the context is REFRESHED or initialized.
  • RequestHandledEvent – This gets called when the web context is HANDLING a request.
  • ContextClosedEvent – This gets called when the context gets closed.

The different types of events related to listeners are:

63.

What Is Ioc?

Answer»

IOC (Inversion of CONTROL pattern) is also KNOWN as DEPENDENCY INJECTION. IOC directs the programmers to depict how to create OBJECTS instead of actually creating them. But in this design pattern, this control has been given to assembler and assembler will instantiate required class if needed.

IOC (Inversion of Control pattern) is also known as dependency injection. IOC directs the programmers to depict how to create objects instead of actually creating them. But in this design pattern, this control has been given to assembler and assembler will instantiate required class if needed.

64.

When Are Declarative And Programmatic Transaction Management Used?

Answer»

When only a small amount of transactional operations is there, it is advised to USE Programmatic transaction management. But if there is a big amount of transactional operations to be taken CARE of, DECLARATIVE transaction management is PREFERRED.

When only a small amount of transactional operations is there, it is advised to use Programmatic transaction management. But if there is a big amount of transactional operations to be taken care of, declarative transaction management is preferred.

65.

What Are The Types Of The Transaction Management That Is Supported By Spring?

Answer»

FOLLOWING are the types of TRANSACTION management that has been SUPPORTED by spring:

Following are the types of transaction management that has been supported by spring:

66.

What Are Different Types Of Autowire?

Answer»

There are FOUR DIFFERENT types of Auto WIRE:

  1. BYNAME
  2. byType
  3. constructor
  4. AUTODETECT

There are four different types of Auto wire:

67.

What Is Called Spring Configuration File?

Answer»

Spring configuration file is an XML file and it contains class INFORMATION. It ALSO describes how these classes are configured and INTERACT with each other.

Spring configuration file is an XML file and it contains class information. It also describes how these classes are configured and interact with each other.

68.

What Is Aop Alliance?

Answer»

AOP ALLIANCE is an open-source project which is aimed at promoting adoption of AOP. The AOP alliance’s goal is to DEFINE a common set of components and interfaces so as to improve INTEROPERABILITY among different AOP implementations.

AOP alliance is an open-source project which is aimed at promoting adoption of AOP. The AOP alliance’s goal is to define a common set of components and interfaces so as to improve interoperability among different AOP implementations.

69.

What Is Aop Module?

Answer»

This AOP module is used for spring enabled APPLICATION. SUPPORT has been provided AOP alliance to ensure the interoperability between spring and other AOP frameworks.
It instructs spring to ADD annotations to the SOURCE code and TELL how to apply aspects.

This AOP module is used for spring enabled application. Support has been provided AOP alliance to ensure the interoperability between spring and other AOP frameworks.
It instructs spring to add annotations to the source code and tell how to apply aspects.

70.

Write About Core Container Module?

Answer»

Core container MODULE is RESPONSIBLE for the basic FUNCTIONALITY of the spring FRAMEWORK. The WHOLE Spring framework is built with this module as a base.

 

Core container module is responsible for the basic functionality of the spring framework. The whole Spring framework is built with this module as a base.

 

71.

What Are The Types Of Dependency Injection?

Answer»

TWO TYPES of DEPENDENCY INJECTION are supported by spring framework:

  1. Setter Injection
  2. Constructor Injection

Two types of dependency injection are supported by spring framework:

72.

Differentiate Between Singleton And Prototype Bean?

Answer»

Singleton MEANS only one BEAN is defined per object instance while Prototype means one DEFINITION to more than one object INSTANCES in Spring.

Singleton means only one bean is defined per object instance while Prototype means one definition to more than one object instances in Spring.

73.

What Are The Different Types Of Events Of Listeners?

Answer»

FOLLOWING are the DIFFERENT types of EVENTS of listeners:
ContextClosedEvent – This EVENT is called when the context is closed.
ContextRefreshedEvent – This event is called when context is initialized or refreshed.
RequestHandledEvent – This event is called when the web context HANDLES request.

Following are the different types of events of listeners:
ContextClosedEvent – This event is called when the context is closed.
ContextRefreshedEvent – This event is called when context is initialized or refreshed.
RequestHandledEvent – This event is called when the web context handles request.

74.

What Are The Methods Of Bean Life Cycle?

Answer»

There are TWO IMPORTANT methods of Bean LIFE cycle:
SetupCALLED when bean is loaded into container.
Teardown – called when bean is UNLOADED into container.

There are two important methods of Bean life cycle:
Setup – called when bean is loaded into container.
Teardown – called when bean is unloaded into container.

75.

How To Start Using Spring?

Answer»

Following steps needs to be done to START with the Spring:

  • Download Spring and its dependent file from spring’s SITE.
  • Create application CONTEXT xml to define BEANS and its dependencies.
  • Integrate application context xml with web.xml.
  • Deploy and Run the application.

Following steps needs to be done to start with the Spring:

76.

What Are The Different Modes Of Autowiring?

Answer»

AUTOWIRING has five DIFFERENT modes:

  1. no: no autowire.
  2. BYNAME : Autowiring that can be done by property name.
  3. byType : property type as autowired.
  4. constructor: It is SIMILAR to byType and it is property is in constructor.
  5. autodetect : Spring is allowed to SELECT autowiring from byType or constructor.

Autowiring has five different modes:

77.

What Is Auto Wiring?

Answer»

Autowiring is used to build relationships between the COLLABORATING beans. SPRING CONTAINER can automatically resolve COLLABORATORS for beans.

Autowiring is used to build relationships between the collaborating beans. Spring container can automatically resolve collaborators for beans.

78.

What Is A Beanfactory Interface?

Answer»

Bean factory interface is used to provide CONFIGURATION framework for object CREATION and basic FUNCTIONALITY around object MANAGEMENT.

 

Bean factory interface is used to provide configuration framework for object creation and basic functionality around object management.

 

79.

Write About Aop Module?

Answer»

AOP module is utilized for CREATING ASPECTS for Spring applications. It ALSO ENABLES support for metadata PROGRAMMING in Spring.

AOP module is utilized for creating aspects for Spring applications. It also enables support for metadata programming in Spring.

80.

Define Application Context Module?

Answer»

This is a very important module and supplies VARIOUS necessary services like EJB integration, REMOTING, JNDI access and scheduling. It transforms spring into a FRAMEWORK. It ALSO BROADENS the idea of BeanFactory by application of lifecycle events, providing support for internationalization messages and validation.

This is a very important module and supplies various necessary services like EJB integration, remoting, JNDI access and scheduling. It transforms spring into a framework. It also broadens the idea of BeanFactory by application of lifecycle events, providing support for internationalization messages and validation.

81.

Explain The Rowcallbackhandler In Spring?

Answer»

The RowCallbackHandler is CALLED for each ROW in RESULTSET and is used to READ values from the ResultSet.

The RowCallbackHandler is called for each row in ResultSet and is used to read values from the ResultSet.

82.

Name The Various Modules Used In Spring Framework?

Answer»
  • AOP module (Aspect Oriented Programming)
  • JDBC abstraction and DAO module
  • The Core container module
  • MVC FRAMEWORK module
  • APPLICATION CONTEXT module
  • O/R mapping integration module (Object/Relational)
  • Web module

83.

Why Spring Framework Is Needed?

Answer»

SPRING framework is needed because it is –

Spring framework is needed because it is –

84.

What Is Called Spring Mvc?

Answer»

A Spring MVC is a single shared controller instance and it is used to handle request TYPE controllers, INTERCEPTORS which run in the IoC container. It also ALLOWS multiple Dispatcher Servlets which can share application CONTEXT interface but not class based interface.

A Spring MVC is a single shared controller instance and it is used to handle request type controllers, interceptors which run in the IoC container. It also allows multiple Dispatcher Servlets which can share application context interface but not class based interface.

85.

Define Bean Wiring?

Answer»

BEAN wiring is the creation of associations between application components that are between the BEANS in a particular SPRING container.

 

Bean wiring is the creation of associations between application components that are between the beans in a particular spring container.

 

86.

What Is Bean Factory?

Answer»

BEAN FACTORY is core of the spring framework and, it is a Lightweight container which loads bean definitions and manages your beans. Beans are configured using XML file and MANAGE singleton DEFINED bean. It is also responsible for life cycle methods and injects dependencies. It also removes adhoc singletons and factories.

Bean Factory is core of the spring framework and, it is a Lightweight container which loads bean definitions and manages your beans. Beans are configured using XML file and manage singleton defined bean. It is also responsible for life cycle methods and injects dependencies. It also removes adhoc singletons and factories.

87.

What Are The Benefits Of Spring Framework?

Answer»

Following are the benefits of Spring framework:

  • Extensive USAGE of Components.
  • Reusability.
  • Decoupling.
  • Reduces coding effort by USING pattern implementations such as SINGLETON, factory, service LOCATOR etc.
  • REMOVAL of leaking connections.
  • Declarative transaction management.
  • Easy to integrate with third party tools and technologies.

Following are the benefits of Spring framework:

88.

Is Singleton Beans Are Thread Safe In Spring Framework?

Answer»

No, SINGLETON BEANS are not thread-safe in SPRING FRAMEWORK.

 

No, singleton beans are not thread-safe in Spring framework.

 

89.

Name The Types Of Transaction Management That Are Supported By Spring?

Answer»

TRANSACTION management SUPPORTED by SPRING are :

  •  DECLARATIVE transaction management.
  •  Programmatic transaction management.

Transaction management supported by Spring are :

90.

What Is The Default Scope Of Bean In Spring Framework?

Answer»

The default SCOPE of bean is SINGLETON for SPRING framework.

The default scope of bean is Singleton for Spring framework.

91.

What Are Advices In Spring?

Answer»

It is the EXECUTION of an ASPECT. Advice is like MAKING your application learn a new trick. They are usually introduced at joinpoints.

It is the execution of an aspect. Advice is like making your application learn a new trick. They are usually introduced at joinpoints.

92.

What Do You Understand By Dependency Injection?

Answer»

DEPENDENCY Injection design pattern allows us to remove the hard-coded dependencies and MAKE our application loosely COUPLED, extendable and maintainable. We can implement dependency injection pattern to move the dependency resolution from compile-time to runtime.
Some of the benefits of using Dependency Injection are: SEPARATION of Concerns, Boilerplate Code reduction, Configurable COMPONENTS and easy unit testing.

Dependency Injection design pattern allows us to remove the hard-coded dependencies and make our application loosely coupled, extendable and maintainable. We can implement dependency injection pattern to move the dependency resolution from compile-time to runtime.
Some of the benefits of using Dependency Injection are: Separation of Concerns, Boilerplate Code reduction, Configurable components and easy unit testing.

93.

What Is Spring Framework?

Answer»

Spring is one of the most widely used Java EE framework. Spring framework core CONCEPTS are “Dependency Injection” and “Aspect Oriented Programming”.
Spring framework can be used in normal java APPLICATIONS also to ACHIEVE loose coupling between different components by IMPLEMENTING dependency injection and we can perform cross cutting tasks such as logging and authentication using spring support for aspect oriented programming..

Spring is one of the most widely used Java EE framework. Spring framework core concepts are “Dependency Injection” and “Aspect Oriented Programming”.
Spring framework can be used in normal java applications also to achieve loose coupling between different components by implementing dependency injection and we can perform cross cutting tasks such as logging and authentication using spring support for aspect oriented programming..

94.

What Are The Limitations Of Ajax?

Answer»

An Ajax WEB APPLICATION TENDS to confuse end users if the network bandwidth is slow and there is no full POSTBACK RUNNING.

 

An Ajax Web Application tends to confuse end users if the network bandwidth is slow and there is no full postback running.

 

95.

Which Request Is Better, Get Or Post?

Answer»

AJAX requests should USE an HTTP GET request where the data does not CHANGE for a given URL requested.
An HTTP POST should be used when state is UPDATED on the server. This is highly recommended for a consistent web application architecture.

AJAX requests should use an HTTP GET request where the data does not change for a given URL requested.
An HTTP POST should be used when state is updated on the server. This is highly recommended for a consistent web application architecture.

96.

What Is The Difference Between Registerclientscriptblock, Registerclientscriptinclude And Registerclientscriptresource?

Answer»

Following are the functions:
RegisterClientScriptBlock – The script is specified as a string parameter.
RegisterClientScriptInclude – By setting the source ATTRIBUTE to a URL that POINT to a script file.
RegisterClientScriptResourceSPECIFIES Resource name in an assembly. The source attribute is automatically populated with a URL by a call to an HTTP handler that retrieves the named script from the assembly.

Following are the functions:
RegisterClientScriptBlock – The script is specified as a string parameter.
RegisterClientScriptInclude – By setting the source attribute to a URL that point to a script file.
RegisterClientScriptResource – specifies Resource name in an assembly. The source attribute is automatically populated with a URL by a call to an HTTP handler that retrieves the named script from the assembly.

97.

How Many Types Of Ready States In Ajax?

Answer»

There are FOUR ready states in AJAX:

  1. Initialization.
  2. Request.
  3. Process.
  4. Ready.

There are four ready states in Ajax:

98.

What Is The Difference Between Proxied And Proxyless Calls In Ajax?

Answer»

Proxied CALLS are MADE through stub objects which can be called from PHP CLASSES on the JAVASCRIPT side in AJAX.
Proxyless calls are made using utility JavaScript functions like HTML_AJAX.replace() and HTML_AJAX.append() in AJAX.

Proxied calls are made through stub objects which can be called from PHP classes on the JavaScript side in AJAX.
Proxyless calls are made using utility JavaScript functions like HTML_AJAX.replace() and HTML_AJAX.append() in AJAX.

99.

What Are The Goals Of Ajax?

Answer»

The basic goals of Ajax are:

The basic goals of Ajax are:

100.

What Are All The Different Data Types That Json Supports?

Answer»

JSON supports FOLLOWING DATA types:

JSON supports following data types: