Advanced Java Interview Questions Answers Guide
Advanced Java Interview Questions Answers Guide
If you find any question or answer is incorrect or incomplete then you can submit your question or
answer directly with out any registration or login at our website. You just need to visit Advanced
Java Interview Questions And Answers to add your answer click on the Submit Your Answer links on
the website; with each question to post your answer, if you want to ask any question then you will
have a link Submit Your Question; that's will add your question in Advanced Java category. To ensure
quality, each submission is checked by our team, before it becomes live. This Advanced Java
Interview preparation PDF was generated at Monday 12th January, 2015
You can follow us on FaceBook for latest Jobs, Updates and other interviews material.
www.facebook.com/InterviewQuestionsAnswers.Org
If you need any further assistance or have queries regarding this document or its material or any of
other inquiry, please do not hesitate to contact us.
http://interviewquestionsanswers.org/Contact-Us
Best Of Luck.
Question # 1
What we can not do in jdbc but can do hibernate?
ue
Answer:-
There are many thing we can do in hinernate automaticaly by
hibernate tools or seting hibernate properties.some I
st
giving below:
(1) We can migrate database just change database dielect.
(2)we can used caching
(3)if user do not know ant any SQL languge then they can
io
Question # 2
A
No,java is not fully object oriented language because it does not support "multiple inheritence" and "pointers" which are used in C++.But,by using Interfaces we can
implement multiple inheritence.Also,due to presence of Primitive datatypes,which are used in (AutoBoxing)...we can say it is not fully object oriented language.
View All Answers
w
Question # 3
If i learn Java, what kind of applications can i create that will help Banking, Retail, Hotel, Logistics industry?
er
Answer:-
When learned the java with the advanced concepts ,the
s.
framework
View All Answers
R
Question # 4
What is difference between object state and behavior?
G
Answer:-
If you change the state of an object, you ask it to perform
a behavior. An object stores its states in a field e.g.
variables, and demonstrates its behavior through methods.
View All Answers
Question # 5
Can we have more than one action servlet?
Answer:-
yes you can have and if you specify different url patter
like
*.do for one action servlet
*.abc for other action servlet
in your web.xml file
View All Answers
Question # 6
Why use a datasource when you can directly specify a connection details? (in a J2EE application)?
Answer:-
In
Because, it would be really difficult to specify the connection details in every method that access the database. Instead, if we create a data source, it can be used to
connect to the database in every method we want.
View All Answers
te
Question # 7
If I define a method in JSP scriplet <%..%>, where will it go after translation into a servlet?
rv
Answer:-
It will give compilation error. In order to define a method
ie
Question # 8
How will the struts know which action class to call when you submit a form?
ue
Answer:-
struts-config.xml in this file.
under the tag <type> absolute path of Action class
under the tag <name> name of the action form class
st
Question # 9
Will it be called overriding if I do not change the parameters or return type, instead throw a different exception in the method signature?
Answer:-
A
Question # 10
Does Java pass arguments by value or reference?
w
Answer:-
Pass by value.
1. When passing primitives, it passes a copy of the
er
Question # 11
R
Different between Struts and Spring? or Why use Spring, if you are already using Struts?
Answer:-
G
Struts:
1.Struts is only for web Applications.We can not develop any
type of Java,J2EE applications by using Struts Framework.
2.We can not Integrate other Frameworks with Any other Java
Oriented Frameworks.
Spring:
1.Spring is for developing any kind of Java,J2EE applications.
2.It is Layered architecture.We can integrate any no of
Frameworks with Spring.
3.It has So many features like AOP,IOC.
View All Answers
Question # 12
Explain what is synchronization?
Answer:-
When multiple threads working,Synchronization is to lock a method for a particular object.
Question # 13
In
}
View All Answers
ie
Question # 14
Explain what is orm?
w
Answer:-
Object Relational Mapping ,its a tool for transaction management that needs to be integrated with Spring,Struts etc.Eg : Hibernate,iBatis,JDO etc
View All Answers
Q
Question # 15
ue
Question # 16
io
Question # 17
A
Question # 18
What are the oops concept?
er
Answer:-
Inhertitance, Encapsulation, Polymorphism, Data Abstraction
s.
Question # 19
O
Question # 20
What is AOP(assepct oriented programing)?
Answer:-
Separating your business logic with other functionalit
y such as services,Loggers etc,Making classess more cohesive.
View All Answers
Question # 21
What is jsp life cycle?
Answer:-
jspinit(),_jspService(),jspdestroy()
View All Answers
Question # 22
Explain servlet life cycle?
Answer:-
In
init(),service(),destroy()
View All Answers
te
Question # 23
What is prototype?
rv
Answer:-
Having multiple instances or having clones
View All Answers
ie
Question # 24
w
Follow us on FaceBook
www.facebook.com/InterviewQuestionsAnswers.Org
Follow us on Twitter
http://twitter.com/InterviewQA