Document Sample
InterviewQuestions Powered By Docstoc
					You should have 10 Core Java , 10 JSP/Servlets / 5 Struts/   5 Design
Patterns / 5 database

Core Java

1. Explain Encapsulation and Polymorphism? What is IS-A and HAS-A in

2. What happens when you import a particular package multiple times?

3. What are access specifiers in java?

4. What are diffenent ways to create an Object in java?

5. What are the new features of java 1.5?

5. What is finally? Can you have a try without catch and finally ? Can
you have a try with either catch or finally?

6. What is finalize? When is final used?

7. how do you define a global constant in java?

8. How do you synchronize an ArrayList?

9. Does an Abstract class have a constructor? If yes, when does it get

10.what is difference between throw and throws? How do you define your
own Exception? Explain the Exception Hierarchy...

11.What are the ways to implement Threads? Why are wait, notify and
notifyAll are defined in Object class.

12.What is the use of class Class?

13.How do you define an ArrayList which can only take String.

14.Scenario of StringTokenizer, how do you implement?

15.What is String Constant Pool?

Database :

1.   What are the steps for creating a Database Connection ?
2.   How do u call a stored proc?
3.   What are the ways to create a connection?
4.   What is Dirty Read and Phantom Read?
5.   What is PreparedStatement and what is its advantage over Statement?
Struts :

1. How does the MVC Architecture work in Struts?
2. What are different core classes of Struts Framework?
3. what is difference between execute and process?
4. How do you define action-mappings in struts?
5. how do you activate validation framework in struts? how do we have our
own custom validations in struts?
6. How do you configure struts in a web application?
7. What is a DynaActionForm and how does it differ from a normal
8. What is the use of reset method used in ActionForm?
9. what are the benefits of Validation Framework provided by struts?
10.What are the different tags used in struts framework? which are the
common tags which you have used in your application?

JSP / Servlets :

1. What elements go in web.xml
2. what is the difference between ServletContext and ServletConfig?
3. How would you fetch the Servlet Init parameter in your Java Code?
4. What are the best practices you use when you design a JSP Page?
5. Have you worked in JSTL? If yes, explain the usage of c tags.
6. If you want to disable scriptlets across application, how would u use
7. How do you invalidate a session? Programatically or Declaratively?
Which one is better?
8. what is difference in jspInit() and init method of servlet?
9. Can we override _jspService of jsp?
10.How do you implement SingleThreadModel in jsp?
11. How does filters work in Web Application?

Design Patters?

1.   What   is   BusinessDelegate and how do we use it?
2.   What   is   ServiceLocator and why would we use it?
3.   What   is   Singleton Pattern and what purpose its used.
4.   What   is   InterceptorFilter pattern and how does it help in
5.   What   is   FactoryPattern and explain its usage.