J2EE Interview Questions
Q.1) What are J2EE and the types of components used in the J2EE Application?
Ans) It is Java 2 Enterprise Edition. This is based on Application programming interfaces(APIs), a set of services and protocols.
Types of components:
Business components. JSP Technology and servlets are web components. Application client's components. Resource Adapter components.
Q.2) Define Spring?
Ans) Spring is used for the development of enterprise application in an open source framework, that solves the complexity of enterprise application development, which is primarily based on inversion control or dependency injection design pattern.
Q.3) What are the uses of spring?
Ans)Dependency injection can be used to improve testability. It decreases coupling in code and increases maintainability. Increase productivity and subsequently decreases the development cost. Spring required enterprise services without the need for an expensive application server.
Q.4) What are the different phases that included in the life cycle of a servlet?
Ans) Servlet installation. Request handling The init method Removal from the service. Servlet class loading.
Q.5) What must be executed by servlets?
Ans) A servlet interface must be executed by all servlets.
Q.6) Is Servlet a pure java object or not?
Ans) Yes, it is a pure java object.
Q.7)What is the method to create objects without using the keyword “new” in java?
Ans) Yes, we can create objects without using new, here is an example:
Q.8)c is Calender and method is getting Instance()
Ans) Calendar c=Calender.getInstance();
Q.9)What is the scope of default in spring?
Q.10)Differentiate the types of modules in spring?
Ans) 7 types of are there in spring, they are:
DAO module. Web module Application context module MVC module The core container module Aspect-oriented programming O/R mapping module.
Q.11)Define Ear File?
Ans) The modules in the J2EE Application are delivered by EAR File. it is nothing but an extension file, like .ear extension.
Q.12)List out the collection types in HIbernate?
Ans) Bag, Map, Array, Set, and List.
Q.13) List out, JSP Tag?
Ans) There are 4 JSP tags, they are Expressions. Scripts. Declarations Directives.
Q.14) Differentiate between war, jar, and ear files?
Q.15) What are the uses of ORM?
Ans) Vendor independence Performance Maintainability Productivity.