Java Interview Questions
The tech job market is very
active these days, particularly in the developing world. Techies seem to be jumping jobs left, right and center.
Naturally the most discussed topics in developer circles are jobs and job interview questions.
During discussions with a few developer friends, we came up with this idea of creating a databank of frequently asked
interview questions (FAQs).
The
easy way to create this interview questions databank, is to ask as many
people as possible to share the questions they were asked or the
questions that they asked.
If you wish to share Java Interview Question/s, please
add a comment to this particular item.
Please copy paste the following format and add your comment.
We will later compile all data into any easy to use format, mostly an
Excel sheet.
Name (optional):
Company (optional):
Location –
Job Position-
Experience-
Skills –
Questions & Answers:
(Update: Aug 06) – Comments over the past year suggest that in Java questions 1) Interfaces 2) Abstract classes are easily the most popular topics. While for web applications questions related to request, session and application scopes are popular.
For questions on:
Software Quality and Testing Interview Questions
Python Interview Questions
Related:
Java and J2EE Today: An interview with Satish Talim
Interviews with Java experts
heres a list of some more questions
wat is the life cycle of a servlet?
tell me a one real instance where u used abstract class
what is meant by bytecode
explain ejb in terms of serializationa nd multithreading?
hi,
this is a gud site and it has enabled me to get an insight of wat questions mite be asked
pls put in more questions in respect to varying experience and technologies
😕 send me the complete java interview question answere,
[email protected]
More questions at http://www.technical-interview.com[URL=http://www.technical-interview.com%5Dwww.technical-interview.com%5B/URL%5D
To prepare for IT interview, you may consider [URL=http://www.technical-interview.com]Technical-Interview.com[/URL]. Many questions and answers are listed there. I found it useful for my interview
Its a great site. I want to know about pack() method in JAVA. 🙂
http://www.anupsabbi.com/index.php?content=articles/interview_questions/core_java.html
http://www.anupsabbi.com/index.php?content=articles/interview_questions/hibernate.html
1. I have a set of stmts. how do you synchronize them
Ans : Using Synchronized blocks
3. difference between Vector and ArrayList
Ans : Vector thread safe and ArrayList is not
Q. DIfference between dictionery and hashmap
Q. In Oracle Pl/SQL, how parameters are passed in and out? Is it pass by value or pass by reference?
Q. Difference between container and component
Ans : Component does not support Transaction, security and other services but Container does.
Q. what is innerjoin? what is outer join?
Q. explain MVC architecture
Q. How do you capture n present the life cycle of a project
Q. difference between SAX n DOM
Ans :
1. SAX is event based where DOM is not
2. SAX consumes less main memory compared to DOM
3. Using DOM one can update the XML content, but one cannot update the XML content using SAX
Q. What is open source according to you.
Q. difference between Hibernate n EJB
Hibernate is lightweight compared to EJB
Q. Explain struts
Q. How do u write a servlet? how do u deploy?
Q. How do you represent a PDF file in XML? given x.pdf file, which represents an aplication form, how you will fill-it up with the data from the database?
Hello How to prepare java in the interview point of view :grin
Yes i liked the site http://www.java-interview.com ,especially the core java and design patterns, will help it there is one more section for weblodic interview questions as well.
I dont think one can crackthe interview with this section….
I found a better one @ http://www.java-interview.com
Name (optional): Citadel
Company (optional):
Location – Pune
Job Position- Senior Software Engineer
Experience- 3+
Skills – Java/j2EE
Questions & Answers:
1. How to kill all the threads in a program in one command.
2. Diff between arryList and Vector
3. Which interface is serialised
4. difference between throw and throws
5. What is the program o/p
try{
return 1
}
catch()
{
retrun 2
}
finally
{
return 3
}
the o/p when error dosent come, when error come
The questions are quite same can any one put up some questions with current topics
why are methods like notify(),notifyAll(),wait present in super class Object?
wait and notify are methods in the basic class Object,so they are shared by all objects in the system
[B]what is difference between application page and contextpage[/B]
:upset
too few answers
Transient Variable is the one which does not serialize its value. Suppose if you want the value is not to serialize to declare that variable as transient is enough 🙂
How we connect from the EJB class to servlet. Do possible.
sameer
Location -noida
Job Position-Dev
Experience-2
Skills -java,jsp,servlet,struts,j2me
Questions & Answers:
here i m providing questions with ans bcoz i hv seen that mostly asked questions only but dont provide ans which makes ppls to search out over net
What is the difference between interface and abstract class?
1Â…Â…Â…all the methods in the interface will be abstract
2Â…Â…Â…abstract class may contain concrete methods.
3Â…Â….interface contains variables that must be static and final;
abstract class may contain both non-final and final variables.
4Â…. members in an interface are public by default, abstract class may contain non-public members.
5Â…Â…interface is used to ‘implements’; whereas abstract class is used to ‘extends’.
6Â….interface can be used to achieve multiple inheritance; abstract class can be used as a single inheritance.
7Â….interface can ‘extends’ another interface, abstract class can ‘extends’ another class and ‘implements’ multiple interfaces.
8.. interface is absolutely abstract; abstract class can be invoked if a main() exists.
9Â….interface is more flexible than abstract class because one class can only ‘extends’ one super class, but ‘implements’ multiple interfaces. If given a choice, use interface instead of abstract class
QUes —4 Why do we need interface in Java. Instead of interface we can write the methods in the class itself. Why do we need seperate interface?
Ans
1Â…Java don’t support Multiple Inheritance. For that we can use Interface. Not always we write methods in Interface, we can also create objects in the Interface. The Object which will be shared between two classes can be created in an Interface.
2Â…Â…Interface acts as communicator for the classes.since interface contains many empty bodies here we can take the advantage of the property of the interface and we can have diffrent implementations for same method as per its use in diffrent classes so interfaces are needed.
which one is thread safe,(1)Arraylist(2)Vector(3)Map(4)Table?
What is mean by Singletone object how to create it???
Ans
Vector is thread Safe.
Singleton Class is a class of which we can make only one object.The programm checks whether any object of that class exists or nor,if it finds the existing one then returns that Object otherwise creates a new one..
The progamm below shows a Singleton class ..this will help u..
public class SingletonTest
{
private static SingletonTest obj;
private SingletonTest()
{
/* ..code..*/
}
public static SingletonTest onlyInstance()
{
if(obj==null)
{
obj=new SingletonTest();
return obj;
}
else
return obj;
}
}
u can mail ur question related queries
[QUOTE] [email protected] [/QUOTE]
What is diffrent ApplicationPage and Context Page? 🙂
why are methods like notify(),notifyAll(),wait present in super class Object
Q:- What is the difference between Web Server and Application Server=> It supports Load Balance,cache control and it supports HTTP, TCP/Ip and all protocols. But Web server can supports only HTTP.
A Webser does not have a EJB Container(EJB Server) and a AppServer contains an EJB Container.
For eg: Tomcat has a webcontainer ONLY which can be used to deploy servlets and JSP’s but one cannot deploy EJB’s on tomcat. But can be deployed on Appserver such as J2EE Server /Web Logic.
Q:- What is the difference between Web Server and Application Server?
what is diff. between jvm and jre