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
Here’s some questions I actually use to screen java applicants. These may seem simple, but you would be surprised how many experienced programmers cannot answer these. The candidate will not get hired if they cannot give a good answer for all of these:
What is the difference between POST and GET?
What is Request, Session and Application scope?
What problems might you encounter if you have a class level variable in a servlet?
What is an interface?
What does the ‘protected’ keyword do?
When writing code to access the database, where is the best place to write your query? In the JSP, the servlet or somewhere else?
Name some common design patterns.
Question: What is transient variable?
i would like to know What is a TX and XA Interface 😕
A Good Question that i was asked.
What is a TX and XA Interface
Checkout Interface vs Abstract Class and other intersteing questions @ [URL=http://agirish.50webs.com]Java, J2ee Interview questions[/URL]
I found some very good java, j2ee interview questions @ http://agirish.50webs.com
An interface is a named collection of method definitions (without implementations).
Interface vs Abstract Class
An interface cannot implement any methods – abstract class can implement methods.
A class can implement many interfaces but can have only one superclass.
Interface can extend other interfaces
What is an abstract method ?
Abstract method is a method with no implementation
What is an abstract class?
Any class that has an abstract method in it or that does not provide an implementation for any abstract methods declared in its superclasses or implemented interfaces must be declared as an abstract class.
* An abstract class is not required to have an abstract method in it.
Q Abstract class vs interfaces
If an abstract class contains only abstract method declarations, it should be implemented as an interface instead.
What is a week referenece in java ?
Albin Joseph
http://www.javacertificate.net
· Interfaces provide a form of multiple inheritance. A class can extend only one other class.
· Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a partial implementation, protected parts, static methods, etc.
· A Class may implement several interfaces. But in case of abstract class, a class may extend only one abstract class.
· Interfaces are slow as it requires extra indirection to to find corresponding method in in the actual class. Abstract classes are fast.
:grin
:upset
Pls provide answers also
This is a very good start, it is a good practice if you add the answer to these questions
🙁 😕 :upset :eek :sigh 😕 :roll :grin :grin :grin :grin :grin
fine site
Difference between vector and array list?
If Static method is synchronized which object is considered for lock?
Explain singleton pattern in java?
Explain monitors in java?
How do u connect to database?
Explain RMI
Explain Java security
Types of database drivers
Location – Mumbai
Job Position- Software Enginner
Experience- 2 Yrs
Skills – Core Java, JSP, Servlets
Q1. Methods present in Object class?
Q2. Why do we have wait()/notify()/notifyAll() methods in Objects class?
Q3. What is MVC Arctitecture?
Q4. What methods are present in HttpServletRequest/HttpServletResponse/HttpServletSession?
Q5. Steps invovled in obtaining DBase connection in JDBC?
Q6. What is Exception Handling and how it is implemented?
Q7. In how many ways session can be traced?
Job Position- Programmer
Experience- 1 year
Skills – JSP Servlets
Q. JSP implicit objects?
Q. Explain MVC with reference to Apache Struts.
Q. How can you track a customer or store customer data using HttpServlet sessions?
Q. What does loadonstartup in a web.xml file achieve?
That’s all I can rememer right now. More later.
Location – India
Job Position- Programmer
Experience- Fresher
Skills – varied
Q. What does abstract mean?
Q. Difference between an abstract class and an interface?
Q. Difference between overloading a method and overriding a method?
Name (optional):
Company (optional): Cognizant
Location – India
Job Position- Developer
Experience- 1 yrs
Skills – Java J2EE
Q1: Explain working of a stateless session bean
Answer- –
Q2: Explain polymorphism
Answer- –
Q3: Explain the J2EE architecture of any project you have worked on
Answer- –
Q4: Are java.lang.String instances immutable?
Answer – Yes.
Most open source projects are terrible at interoperability. Projects are built for a single need. But because they are open source, you have the ability to change it. Most commerical projects are terrible at interoperability also. With these projects, you can pay the vendor to change it. Companies need to decide which is better for them.
A new article on JDJ lists 30 Java interview questions with short answers to each question.
A couple of example:
> What’s the difference between an interface and an abstract class?
> What’s the difference between J2SDK 1.5 and J2SDK 5.0?
[URL=http://jdj.sys-con.com/read/48839.htm]JDJ Java Interview Questions[/URL]
the big problem with Java interviews, is that often the interviewer isn’t competent at the vast variety of complex Java stuff like J2EE, J2ME etc.
So first guage the competence of the interviewer before you start giving complex answers.
😕