In this article I will talk about next part of commonly asked Java/JEE interview questions.
Before, jumping to the list, I want to mention that It is great to be good technically, but you have to be also great on communication to succeed.
Being a good communicator will help you get the interview easier.
One of the tools will help you to write a good cover letter and email message is Grammarly’s AI-powered writing assistant
So, let’s go back to our list.
25) What is a thin client?
A J2EE application client runs on a client machine and can provide a richer user interface than can be provided by a markup language.
An application client is typically downloaded from the server, but can be installed on a client machine.
26) Differentiate between .ear, .jar and .war files
a) .jar files
These files are with the .jar extension.
The .jar files contains the libraries, resources and accessories files like property files.
b).war files
These files are with the .war extension.
The .war file contains jsp, html, javascript and other files for necessary for the development of web applications.
c).ear files
EAR is a file format used by Java EE for packaging one or more modules into a single archive so that the deployment of the various modules onto an application server happens simultaneously and coherently.
27) What are the JSP tag?
In JSP tags can be divided into 4 different types.
Directives, Declarations, Scriplets and Expressions
28) What are JSP Directives?
a) page Directives
b) include Directives
c) taglib Directives
29) What is Struts?
Struts framework is a Model-View-Controller(MVC) architecture for designing large scale applications.
Which is combines of Java Servlets, JSP, Custom tags, and message.
Struts helps create an extensible development environment for the application, based on published standards and proven design patterns.
Model in many applications represent the internal state of the system as a set of one or more JavaBeans.
The View is most often constructed using JavaServer Pages (JSP) technology.
The Controller is focused on receiving requests from the client and producing the next phase of the user interface to an appropriate View component.
The primary component of the Controller in the framework is a servlet of class ActionServlet.
This servlet is configured by defining a set of ActionMappings.
30) What is ActionErrors?
ActionErrors object that encapsulates any validation errors that have been found.
If no errors are found, return null or an ActionErrors object with no recorded error messages.
The default implementation attempts to forward to the HTTP version of this method.
Holding request parameters mapping and request and returns set of validation errors, if validation failed; an empty set or null
31) What is ActionForm?
ActionForm is a Java bean that associates one or more ActionMappings.
A java bean become FormBean when extend org.apache.struts.action.ActionForm class.
ActionForm object is automatically populated on the server side which data has been entered by the client from UI.
ActionForm maintains the session state for web application.
32) What is action mapping ?
The ActionMapping represents the information that the ActionServlet knows about the mapping of a particular request to an instance of a particular
Action class.
The mapping is passed to the execute() method of the Action class, enabling access to this information directly.
33) What is the MVC on struts.
MVC stands Model-View-Controller.
Model : Model in many applications represent the internal state of the system as a set of one or more JavaBeans.
View : The View is most often constructed using JavaServer Pages (JSP) technology.
Controller : The Controller is focused on receiving requests from the client and producing the next phase of the user interface to an appropriate View component.
The primary component of the Controller in the framework is a servlet of class ActionServlet.
This servlet is configured by defining a set of ActionMappings.
34) What are different modules in spring?
There are seven core modules in spring:
1- The Core container module
2- O/R mapping module (Object/Relational)
3- DAO module
4- Application context module
5- Aspect Oriented Programming
6- Web module
7- MVC module
35) What is Spring?
Spring is a light weight open source framework for the development of enterprise application that resolves the complexity of enterprise application development also providing a cohesive framework for J2EE application development.
Which is primarily based on IOC (inversion of control) or DI (dependency injection) design pattern.
36) Functionality of ActionServlet and RequestProcessor?
Receiving the HttpServletRequest
Populating JavaBean from the request parameters
Displaying response on the web page Issues
Content type issues handling
Provide extension points
37) ActionServlet, RequestProcessor and Action classes are the components of
Controller
38) What is default scope in Spring?
Singleton.
39) What are advantages of Spring usage?
Pojo based programming enables reuse component.
Improve productivity and subsequently reduce development cost.
Dependency Injection can be used to improve testability.
Spring required enterprise services without a need of expensive application server.
It reduces coupling in code and improves maintainability.
40)What are the Benefits Spring Framework ?
Light weight container.
No need to read from properties file application code.
It is much easier to unit test Objects are created Lazily.
Spring’s configuration management services can be used in any architectural layer, in whatever runtime environment
41) What is servlet?
Servlet is a server side components that provide a powerful mechanism for developing server side programs.
Servlet is a server as well as platform-independent and Servlets are designed for a various protocols.
Most commonly used HTTP protocols.
Servlet uses the classes in the java packages javax.servlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession.
All servlets must implement the Servlet interface, which defines life-cycle methods.
42) Servlet is pure java object or not?
Yes, pure java object.
43) What are the phases of the servlet life cycle?
The life cycle of a servlet consists of the following phases:
Servlet class loading
Servlet instantiation
the init method
Request handling (call the service method)
Removal from service (call the destroy method)
44) What must be implemented by all Servlets?
The Servlet Interface must be implemented by all servlets
Conclusion:
I hope that this article will give you a great insight into JAVA/JEE interview questions and answers.
The responses given above will really enrich your knowledge and increase your understanding of JAVA/JEE programming.
Don’t forget the communication plays a big role in the recruiting process.
Make sure to use Grammarly’s AI-powered writing assistant for correcting your texts before sending them to your future employers.
Bonus:
By applying universal rules of software architecture, you can dramatically improve developer productivity throughout the life of any software system.
Now, building upon the success of his best-selling books Clean Code and The Clean Coder, legendary software craftsman Robert C. Martin (“Uncle Bob”) reveals those rules and helps you apply them.
Clean Architecture: A Craftsman’s Guide to Software Structure and Design (Robert C. Martin Series)
Some related articles you might interest in :
1-Most Commonly Asked Java/JEE Interview Questions (Part-1)
2-OOP is Now The Basis of Computer Science
3- 6 Best Programmers of All Time
4-The Most Promising Fields for Programming in the Future
5-The 5 Most Used Languages for Web Development
6- The Best Way To Improve Your Programming Skill Level
7- Recommended Programming Language for Beginner To LEARN First
Connect with me on :Blog, Youtube, Facebook, Twitter