0% found this document useful (0 votes)
7 views10 pages

Interview Q

The document is a comprehensive list of interview questions covering various Java technologies including Java, JEE, Spring, Hibernate, Web Services, RESTful Services, and XML technologies. It includes questions on concepts like polymorphism, OOP principles, servlet request flow, Spring IOC, Hibernate methods, and web service security. Additionally, it provides insights into the interview process and emphasizes understanding over rote memorization.

Uploaded by

Haribabu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views10 pages

Interview Q

The document is a comprehensive list of interview questions covering various Java technologies including Java, JEE, Spring, Hibernate, Web Services, RESTful Services, and XML technologies. It includes questions on concepts like polymorphism, OOP principles, servlet request flow, Spring IOC, Hibernate methods, and web service security. Additionally, it provides insights into the interview process and emphasizes understanding over rote memorization.

Uploaded by

Haribabu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JSE

- What do you mean by polymorphism in java? Where did you use it in


your experience?
- Can you explain me about Java OOPS?
- Why is abstraction in Java?
- What is encapsulated object?
- Why is java bean used for?
- When do you use an array?
- How many JVMs can we start in a single system?
- What are the new features in Java 7 and 8?
- How do you serialize an object and why?
- Why is the use of garbage collection in java? How does it work? Can
we call it explicitly?
- What is the default size of a JVM? Can we increase the size of it?
How?
- How do you handle exceptions? Can you explain me the flow of try-
catch-finally? Where do you commit/rollback the transactions?
- How many types of exceptions, are there and did you create any
custom exceptions in your project?
- Have you used multi-threading in your project?
- How do you resolve ConcurrentModificationException? Why does it
occur?
- When do you use ArrayList, LinkedList collection?
- When do we go for Map collections?
- When do you use Properties collection?
- How many ways, can we create a thread? When for what?
- Can we synchronize a block at object-level?
- Do you have any idea about String Constant Pool? Why is it?
- Why do we use for “forEach” loop?
- What is a singleton class? Why do we create it? Did you create any
singleton classes in your project? What components, did you make
singletons?
JEE

- Can you explain the servlet request flow?


- Is servlet a singleton object? If yes, why is it singleton? Can we make
it prototype? If yes, how can we make?
- Can you explain the request flow for the JSP page in server? Where
do you place JSP pages in your project?
- Can we forward a request to a JSP page if it exists in WEB-INF?
- Can we develop web application without [Link]? If yes, how can
we?
- What annotations, do you aware of java? What is for what purpose?
- If we want to do some common work for all the components in the
application. Where can we do that and how?
- If we want to load fixed data before first request into the JVM. Where
can we write that logic so that it is loaded before any request to the
application?
- Can we replace servlet with JSP? What are the advantages and
disadvantages?
- Can we replace JSP with servlet? What are the advantages and
disadvantages?
- Is JSP a singleton object in JVM?
- What is the purpose of session object?
- Why application server? Why not webserver?

Spring

- Why IOC? How does it work?


- How can we make bean as singleton and prototype?
- How many scopes, are there in spring? What for what purpose?
- Why did you use spring?
- How do you make class a bean in IOC using annotations?
- What MVC annotations, are you aware of? What for what purpose?
- When do you use @Autowired?
- Did you use AOP? If yes, why is it used for?
- Did you use Spring Jdbc? If yes, why not Java Jdbc and Hibernate?
- What is the use of RowMapper in Spring Jdbc?
- How to use Spring with Hibernate?
- When to go for setter injection over constructor injection?
- How do solve constructor injection confusion?
- What is an aspect in AOP?
- How many advices, are there in Spring AOP? What are those?
- How do you specify a name to a bean in IOC using annotations?
- Did you use java configuration class? If yes, why did you use it?
What annotations, did you use on java configuration class?
- Can we have multiple java configuration classes? If yes, how can we
achieve? When should we do that?
- What is the purpose of DispatcherServlet? How can you provide
configuration xml file to it?
- Can you develop a spring application by only using annotations
including [Link]?
- Did you work on transactions in your project? Why did you use?
Where did you use?
- How many transactions, are created for a request? Why?
- Why spring annotations? Why not xml?
- Can you explain your project request flow?

Hibernate

- What does load() method do? What does get() method do?
- Can you make get() method as lazy loader? If yes, how?
- How do mention an attribute as a primary key or composite primary
key?
- Is caching available in Hibernate? How many caching levels available
in Hibernate? What for what purpose?
- Did you work on HQL? If yes, why did you use? How do you execute
HQL?
- Do you have idea on Criteria in Hibernate? If yes, what is it? Why is
it used over HQL?
- What annotations, did you use in your project? What for what
purpose?
- Can you write one-to-many relationship xml configuration with an
example?
- Do you remember normalizations? Can you explain 2nd
normalization?
- Why do we normalize data?
- Did you use Increment ID Generator? How does it work?
- Why not Sequence ID Generator?
- Why Hibernate? Why not Java Jdbc?
- What is the parent exception in Hibernate? What type of exception is
it and why?
- How many session objects, do you create for a request?
- Can you tell me the differences between save() and saveOrUpdate()?
How does saveOrUpdate() work?
- Can you tell me the differences between update() and merge()?
- Can you write a snippet of code for creating SessionFactory? Where
and when do you create SessionFactory? How many SesionFactory
objects, do you have in your project? Why?

Web Services (SOAP)

- How many sections, are there in a SOAP xml? Can you explain their
purposes?
- Why SOAP? Why not REST?
- What is the differences between JAXRPC and JAXWS?
- What implementation, did you use in your project? Why?
- How do you secure a Web Service?
- What do you mean by a Web Service?
- Can we send JSON or HTML over SOAP Web Services? If no, why
can’t we?
- Assume, there are two systems A and B. A is consuming B’s service.
One day, we got to change the signature of the method in Web Service
class by adding new parameter. What changes, might be occurred in A’s
and B’s systems?
- Are you a consumer or producer of Web Service? If both, explain?
- How many Web Services, are you aware of? Explain their
advantages/disadvantages?
- How do you share your Web Service to your consumers?
- Can you explain me the use of WSDL in a Web Service? What
sections, does it contain and their purposes?
- How do you make class a Web Service in JAXWS?
- What annotations, are you aware of in JAXWS? What is for what
purpose?
XML Technologies
- What is purpose of XML? When do we use XML? What is well-
formed XML? How do you validate an XML?
- What is an XSD?
- How do you convert XML to an object?
- What is SAX/DOM mechanism? Which is good in performance?

RESTful Services

- Why REST? Why not SOAP?


- Can we send HTML code over REST? How?
- What annotations, are you aware of in REST? What is for what
purpose?
- What do you mean by resource in REST? How do you make a
resource in REST?
- How many places, do you get data from http request?
- What is the purpose of @PathParam?
- What is the purpose of @MatrixParam?
- How do you handle exceptions in REST?
- What are http response codes and their purposes?
- How do share your REST Service info to consumers?
- How do you consume RESTful Service? Can you write a snippet of
code?
- Can you explain me GET, POST, PUT methods of HTTP?
- What is a sub-resource?
*I was asked 3-4 questions on every technology/tool
highlighted/mentioned in my resume.

*I suggest you to learn by understanding the topic/technology, not by


questions.

*I remind everyone to follow this listen-understand-practice-explore.

Capagemini :
1.) Explain Ur Project
2.) Where U where Used Polymorphism in Ur Project
3.) What is Difference Between the Interface and Abstract class where u
where used in Ur Project
4.) What is Transaction and Where u used in Ur Project
5.) Tell me How many Implicitly Objects in JSP
6.) What is Scrum Meeting
7.) What is JUnit tell me How to apply
8.) What is Maven how do U used in ur Project. 9.)What is Spring
Frame Work Inautix :
1.) Explain Ur Project and Ur Roles
2.) Explain the MVC Flow
3.) What is Spring Transactions
4.) What is Difference Between the load & get Methods in Hibernate
5.) Difference Between the Hibernate & JDBC
6.) What is Spring Framework.
7.) What is IOC Container
8.) What is Injection
9.) What is Loosely Couple in Spring IOC Container
10.) How to achieve the loosely couple in core java
11.) What is JUNIT
12.) What is Maven How do Use Maven in Ur Project 13.) Difference
Between the Web Server and Application Server EZDI :
1.) What is Spring Framework
2.) What is Dependency lookup
3.) What is Difference between the Spring 3.0 and 4.0 4.) Spring MVC
flow
5.) What is Collections
6.) What are the collections U were Used in Ur Project Frequently
7.) Difference B/W the LIST,SET
8.) Explain the internal Flow of Hash Table and Hash Map
also,TreeMap Also 9.) If we Put the Employee Object as Key in Map
then I should have to Override the .equals () & hash Code() method OR
NOT , IF NOT What will happen , IF Override what will happen By
Programmatically...
10.) What is Security
11.) Explain the Security in Ur Project
12.) Explain what is Restful Service
13.) Explain the Web Service
14.) In SOAP Based Web Service (WS/RPC) we can send XML over
HTTP Protocol Data Or NOT. 15.) How Security Handel in Web
Service and Restful Service also
16.) Explain the Facade DP
17.) Explain the Singleton DP
18.) Factory DP
19.) Find the Missing Element in Array With Less Comparisons
20.) Binaryserch Algorithm Cybage :
1.) Difference Between the List Set
2.) Multi Thread
3.) OOPS Concepts
4.) Hibernate Mapping Files
5.) Hibernate Cfg File
6.) Hibernate get & load Method Differences
7.) Spring AOP
8.) Spring MVC
9.) Array all algorithm
10.) Spring Security
11.) Singleton DP
12.) Logical Questions On Arrays
13.) Spring Transactions
14.) Facade DP
15.) Template DP
16.) Factory DP
17.) Cache DP
18.) Transaction Propagation Levels and Isolation Problems
19.) How you are Optimize the Application Performance in your
Application
20.) Web-Service Security ......... PLAIN JDBC SQL Strategise
1.) DDL 2.) DML
3.) DCL
4.) DTL
5.) Difference B/w Truncate Delete 6.) Can u rollback the DDL
Operations
===================================================
========
Q.1: How do you distribute Provider-side web service to Consumer ?
Q.2: What are the problem, you have faced during developing Provider-
side web services?
SJG
what is the purpose of static keyword and static block? which situation
we can use?can any one explain me?
What is Disadvantage's Of Hibernate?Can you Explain?
[Link] we know we cannot instantiate Abstract class then why there is no
restriction for taking constructor in Abstract class

[Link] is the difference between concrete class in 1.7 and interface in


1.8
In both cases we can take method main method all those things

[Link] is Marker interface, can we create our own markup interface if


yes then how jvm will know about your custom markup interface

[Link] can I create Custom Arraylist.


[Link] many way we can create Immutable class brief it with step
interview question (for 2-3 yr experience)

1. By make our class as immutable what we achieve. In your project


where u use.

2. In your project where u use interface and abstract class.


3. Did you ever face ConcurrentModificationException, when it will
occur.

4. Diff between spring singleton and user defined singleton.


5. Flow of spring mvc, what is the use of @requestmapping.
6. Diff between enumeration and iteration

7. If we create a static method m1, and nonstatic method m2 both are


synchronised, in main method we have 4 thread all are calling m1 and
m2, is there any chance of interruption, if not then why

8. diff between error and exception. if checked exception is recoverable


exception then how we can recover it?

9. [10,5,19,11,20,8,13]. Find the second smallest and second highest


from the array.
10. If we have same url in two controller. For example
@RequestMapping(value="/add") then what will happen?
Difference b/w the [Link]() &[Link]()

You might also like