Java - Interview Questions and Answers for 'Frameworks' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Java Interview Questions


 2098 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Frameworks' - 30 question(s) found - Order By Newest

Recently asked in Accenture and Fidelity.
 Q1. Explain Flow of Spring MVC ?Spring
Admin
info@buggybread.com
Ans. The DispatcherServlet configured in web.xml file receives the request.

The DispatcherServlet finds the appropriate Controller with the help of HandlerMapping and then invokes associated Controller.

Then the Controller executes the logic business logic and then returns ModeAndView object to the DispatcherServlet.

The DispatcherServlet determines the view from the ModelAndView object.

Then the DispatcherServlet passes the model object to the View.

The View is rendered and the Dispatcher Servlet sends the output to the Servlet container.

Finally Servlet Container sends the result back to the user.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   architecture     Accenture  fidelity  IBM India      Basic        frequent


 Q2. What are the benefits of using Spring Framework ?Spring
Admin
info@buggybread.com
Ans. Spring enables developers to develop enterprise-class applications using POJOs. The benefit of using only POJOs is that you do not need an EJB container product.

Spring is organized in a modular fashion. Even though the number of packages and classes are substantial, you have to worry only about ones you need and ignore the rest.

Spring does not reinvent the wheel instead, it truly makes use of some of the existing technologies like several ORM frameworks, logging frameworks, JEE, Quartz and JDK timers, other view technologies.

Testing an application written with Spring is simple because environment-dependent code is moved into this framework. Furthermore, by using JavaBean-style POJOs, it becomes easier to use dependency injection for injecting test data.

Spring’s web framework is a well-designed web MVC framework, which provides a great alternative to web frameworks such as Struts or other over engineered or less popular web frameworks.

Spring provides a convenient API to translate technology-specific exceptions (thrown by JDBC, Hibernate, or JDO, for example) into consistent, unchecked exceptions.

Lightweight IoC containers tend to be lightweight, especially when compared to EJB containers, for example. This is beneficial for developing and deploying applications on computers with limited memory and CPU resources.

Spring provides a consistent transaction management interface that can scale down to a local transaction

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   spring framework   mvc   spring container   architecture   technical architect   java architect   technical lead  ioc     MasterCard


 Q3. Why Struts 1 Classes are not Thread Safe whereas Struts 2 classes are thread safe ?
Admin
info@buggybread.com
Ans. Struts 1 actions are singleton. So all threads operates on the single action object and hence makes it thread unsafe.

Struts 2 actions are not singleton and a new action object copy is created each time a new action request is made and hence its thread safe.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   j2ee   mvc frameworks   struts   struts1   struts2   struts 1   struts 2   architecture

Try 1 Question(s) Test


 Q4. What bean scopes does Spring support? Explain them.Spring
Admin
info@buggybread.com
Ans. The Spring Framework supports following five scopes -

Singleton
prototype
request
session
global-session

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   beans   beans scope   at&t  fidelity


Very frequently asked.Usually among first few questions.
  Q5. What is MVC ? Design
Anonymous
Ans. The Model/View/Controller pattern, a strategy for dividing responsibility in a GUI component.

The model is the data for the component.

The view is the visual presentation of the component on the screen.

The controller is responsible for reacting to events by changing the model.

According to the MVC pattern, these responsibilities should be handled by different objects.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   mvc   mvc design pattern   design pattern   struts   spring   web application   web frameworks   ebay     HCL Technologies  Tata Consultancy (TCS)  Wipro  United Health Group (UHG)  Accenture  Fidelity  Fidelity Investments   Tieto  Walt Disney  Sharon Software Systems  Tech Mahindra  Amdocs  Deegit  Lexis Nexis  Elsevier      basic        frequent

Try 1 Question(s) Test


 Q6. What are the steps to be performed while coding Junit with Mocking framework ?
admin
info@buggybread.com
Ans. Initialize required objects for working with mocks and tested method
Set the mock behaviour on dependent objects
Execute the tested method
Perform assertions
Verify if a method is invoked or not

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     junit   mocking frameworks   mock   unit testing   java   white box testing


 Q7. Name few Dependency Injection frameworks ?
admin
info@buggybread.com
Ans. Google Guice , Spring , PicoContainer and Dagger.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     dependency injection   di   frameworks   ioc


 Q8. What are some differences between Spring caching and Hibernate caching?Hibernate
Admin
info@buggybread.com
Ans. Spring caching makes use of its intercepting capabilities to add caching to method calls. Therefore, the entire object is cached and reused. Hibernate, on the other hand, has more domain-specific knowledge of the Entity being cached and can handle the objects more appropriately.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     spring framework   hibernate   spring cache   hibernate cache


 Q9. What are different modules of spring ?
Spring
Admin
info@buggybread.com
Ans. There are seven core modules in spring

Spring MVC
The Core container
O/R mapping
DAO
Application context
Aspect Oriented Programming or AOP
Web module

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. What is Spring configuration file?Spring
Anonymous
Ans. Spring configuration file is an XML file. This file contains the classes information and describes how these classes are configured and introduced to each other.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   spring configuration file     Bosch


 Q11. Q: What is default scope of bean in Spring framework?
Spring
Admin
info@buggybread.com
Ans. The default scope of bean is Sing leton for Spring framework.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   bean


Very Frequently asked Spring question.
  Q12. What is bean auto wiring?Spring
Admin
info@buggybread.com
Ans. The Spring container is able to autowire relationships between collaborating beans. This means that it is possible to automatically let Spring resolve collaborators (other beans) for your bean by inspecting the contents of the BeanFactory without using and elements.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   autowiring   beans   at&t   ge     Infosys  HCL Technologies  Tata Consultancy  Wipro  PwC  Tech Mahindra  AT&T  General Electric  Sophos        frequent


Frequently asked in Phone Interviews.
 Q13. What the Bean scopes provided by Spring ?Spring
Admin
info@buggybread.com
Ans. Singleton , Prototype , Request , Session , global-session

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     spring framework   bean scope   general electric   ge


 Q14. What is Hibernate ?Hibernate
Admin
info@buggybread.com
Ans. Hibernate is a Java ORM Framework.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hibernate   orm   frameworks   architecture


 Q15. Name few Java Mocking frameworks ?
admin
info@buggybread.com
Ans. Mockito, PowerMock, EasyMock, JMock, JMockit

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     junit   mocking frameworks   mock   architecture   white box testing


 Q16. Name some Java REST services frameworks ?Rest
Admin
info@buggybread.com
Ans. Jersey , Restlet , RestX, Spring , RestEasy ,Restfulie, Play Framework

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   rest   web services   frameworks


 Q17. Which web application framework you like and Why ?Framework
Admin
info@buggybread.com
Ans. I like Spring as it comes with inbuilt Dependency Injection framework. It has great online community and support and is proven to work well with ORMs like Hibernate. If we are not working with ORM and DI, Struts 2 is also good.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     spring   struts   project lead   technical lead   techical architect


 Q18. What is the difference betweeen @Inject and @Autowired ?Spring
Admin
info@buggybread.com
Ans. @Autowired and @Inject are similar in terms of functionality they achieve. @Inject is part of a new Java technology called CDI that defines a standard for dependency injection whereas @Autowired is a Spring specific annotation for dependency injection.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     spring   web frameworks   dependency injection   autowired   inject   spring annotations   ioc


 Q19. Should we have instance variables in the Spring Bean which has been scoped as Singleton ?Spring
Admin
info@buggybread.com
Ans. No, if required we should only have final variables.Bean scoped singleton means that only one instance of the bean will be created and will be shared among different requests and hence instance variables will get shared too.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   singleton   spring framework   spring beans



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q20. Action Class is singleton and hence not thread safe in ..

a. All versions of Struts
b. Struts 1
c. Struts 2
d. None of Struts versions
Anonymous
Ans. Struts 1

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     struts   j2ee   mvc frameworks   struts1   struts2


 Q21. Which of the following is not the advantage of Mocking frameworks ?

a. It helps testing the module independently
b. It helps in faster unit testing
c. It helps in testing code even when external dependencies like service calls are not working
d. It helps in doing end to end Integration Testing
Anonymous
Ans. It helps in doing end to end Integration Testing

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     mocking frameworks   mockito   unit testing   junits


 Q22. Which of the following is the implementation language for Map Reduce Framework ?

a. Big Data
b. Hadoop
c. Java
d. C++
Anonymous
Ans. Java

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hadoop   bigdata   big data   map-reduce   map reduce framework


 Q23. Which java frameworks have you used ?General

Ans. I have primarily worked on Web applications and hence worked on Struts , Spring , Hibernate, JSF ( Java Server Faces ) , Velocity etc.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     elsevier   frameworks   java frameworks   general question     Elsevier  EPAM  TD Ameritrade      basic        frequent


 Q24. What is Hadoop Framework ?BigData2016-10-17 09:58:36

Ans. Hadoop is an open source framework , written in java by apche software foundation. This framework is used to write applications to process vast amount of data. Processing happens in parallel on large clusters which could have 1000 of computers. It processes data in a very reliable and fault tolerant manner.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     Hadoop framework  BigData


 Q25. Can you name some of the Java frameworks in different domains ?Frameworks2017-01-23 09:41:33

Ans. Web Framework - Spring , Struts, Play
Dependency Injection frameworks - Google Guice , PicoContainer and Dagger
ORM Framework - Hibernate
Big Data / ETL Frameworks - Apche Hadoop , Apache Crunch, Apache Spark.
View Frameworks - JSF , Apache Wicket,jtwig.
Java Gui Frameworks - SWT , AWT, JavaFX
Testing - Junit, Mockito, PowerMock, EasyMock, JMock, JMockit
Rest Web services - Jersey , Restlet , RestX, RestEasy ,Restfulie

Here is the big list for reference - http://javasearch.buggybread.com/home2.php?keyword=

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     frameworks     Craftsvilla.com  ZooPlus      intermediate        frequent


 Q26. What are the components of Spring framework ?Spring2017-02-06 11:57:01

 This question was recently asked at 'Deloitte,NZone,L&T Infotech,Ocean Consulting'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     spring  spring framework components     Deloitte  NZone  L&T Infotech  Ocean Consulting


 Q27. Name few View frameworks you have worked with.Frameworks2017-03-10 10:43:59

Ans. JSF, Apache Wicket and Apache Velocity

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     view framework


 Q28. What is Executor Framework in Java?2017-04-30 09:48:47

 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     executor framework


 Q29. Which validation frameworks have you worked on ?Frameworks2017-08-17 19:31:03

 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     validation frameworks


 Q30. Spring MVC is a .. Spring
a. Model Framework
b. View Framework
c. GUI Framework
d. Web Framework

Ans.d. Web Framework



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: