About the Reviewer
Meera Subbarao has a Bachelors degree in Electronics and Communication Engineering and seventeen years of software programming experience around the globe, from Bangalore,India to Dubai,United Arab Emirates, to the United States. She has spent the past six years at DataSource, Inc. in Maryland and has been working on J2EE technologies exclusively for the last six years.  She is a Sun Certified Java Programmer as well as a Sun Certified Web Component Developer. Meera is also the Team Leader for the Javalobby/dzone book review team.
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.

Java/J2EE Job Interview Companion



Author(s) K.Arulkumaran & A.Sivayini
Publisher LuLu.com
PubDate March 2007
Reviewer Meera Subbarao



One Minute Review


Positives
  • Easy to understand questions and answers format
  • Answers followed by examples, sample code and diagrams
  • Covers Java & J2EE
  • Unique in its own way
  • Also includes questions on Java 5 and EJB 3
  •  Key points and Tech Tips at the end of each section
Negatives
  • It was hard to read the pdf(356 pages) on my laptop


Sections

Intent & Audience

I have read several technical books over the last few years, but this one was entirely different. The questions and answers format was something which I had not seen in any other book and wasn't sure if would help either. But I was wrong. The objective of the authors is great, to help Job seekers as well as interviewers; and I think they have succeeded in doing so. They have compiled several questions and answers, and also have very good tips on how to face an interview.

Relevance of material

The authors in the first paragraph say that "The basic purpose of this book is to cover all the core concepts and key areas, which all Java/J2EE developers, designers and architects should be conversant with to perform well in their current jobs and to launch a successful career by doing well at interviews." The book lives up to its title and to the above quote, and is truly an interview companion.

The authors cover Java, J2EE fundamentals and technologies like Spring, Hibernate, JSF etc. This book isn't supposed to be used as a reference for any of these technologies, it helps you (only and only if you know these subjects) to refresh your knowledge before attending an interview. Unless you have thorough knowledge in these subjects, even memorizing the answers won't take you much far in the interview. If you are asked to backup the answer with more explanation or written code what will happen? Nothing serious, you won't get the Job, right?

Rating

When I stated reading the first few pages of this book I wasn't sure how I would rate this. But having completed the whole pdf over the Memorial Day weekend, I should say, the detail and the expertise the authors show in their explanation is remarkable. The authors have done a tremendous job of compiling the most frequently asked questions in an interview and have excelled in giving answers for the same; backing up each answer with sample code and diagrams. As the title suggests, the book should be used as a companion and not as a reference material. For those of you who are using this book, or going to buy this, use this as a guide to recap your concepts.

Relevance  
Readability
Overall

Chapter highlights

Section 1 Interview questions and answers on: Java

Fundamentals. This part covers basic questions like what are the usages of Java packages, what do you mean by polymorphism, inheritance, encapsulation, and dynamic binding to some frequently asked questions like what are some of the best practices relating to Java collection, what is the difference between "==" and equals(...) method, what is the difference between shallow comparison and deep comparison of objects?

This section also has questions related to new features which were added in J2SE5.0; generics, annotations, autoboxing and auto-unboxing of primitive types, enhanced "for" loop, enumerated type, static import, C style formatted output, formatted input, varargs, etc. with sample code followed by brief explanations.

Swing.This section starts by explaining the difference between AWT and Swing and answers several interesting questions like how does Swing painting happen, how will you improve the painting performance, and explain the Swing event delegation model.

Applet. This lesson talks about the basics of applets, life cycle of an applet, communication betweens applets and Servlets and finally difference between an applet and application, and whether you can use an applet as an application.

Performance and Memory issues are the most frequently asked questions in all interviews. This section has answers to:

  • How would you improve performance of a Java application?
  • How would you detect and minimize memory leaks in Java?

Personal and Behavioral/Situational covers questions usually asked in most interviews; the author provides some useful hints here.

  • Did you have to use any design patterns in your Java project?
  • Why are you leaving your current position?
  • How do you handle pressure? Do you like or dislike these situations?
  • What past accomplishments gave you satisfaction? What makes you want to work hard? The author says in the first point "Material rewards such as salary, perks, benefits etc naturally come into play but focus on your achievements or accomplishments rather than on rewards". That's so true Arul; I agree 100% with you, so will the readers.

Behaving right in an interview. Also well covered section where the author gives some useful tips like; Never arrive too late or too early, Firm handshake, maintain eye contact do not make up your answer or try to bluff, You should also ask questions.

Key Points. This section provides one or two lines definitions for major key words. These I think you can and should memorize for your interview.

Section 2 Interview questions and answers on: EnterpriseJava

J2EE Overview. From this section, you should be able to confidently answer; why use J2EE, J2EE platform architecture, and the several APIs and technologies which make J2EE a working platform.

Servlet. Covers life cycle methods of Servlet, directory structure of a web application, the difference between doGet and doPost, how you make a Servlet thread safe, what is a RequestDispatcher and Servlet clustering and many more.

JSP. This section covers life cycle methods of JSP, scriptlets, expressions, different scopes, JSP EL and JSP best practices. It covers a wide range of questions in this topic as well.

JDBC / JTA.  This is an amazing section, which covers basics as well as advanced topics. Starting from simple questions like what is JDBC, what are statements to complex ones like what is a distributed transaction, why JTA transactions are more powerful than JDBC transactions. The explanation and the diagrams the author has used are really remarkable. Attached is a screen shot from this chapter showing a diagram while explaining DAO pattern:

JNDI / LDAP. In this section you will get answers to questions like what is JNDI, what is a JNDI Initial Context, and what is an LDAP server.

RMI. This section covers basic RMI questions as well. There were a few interesting questions which I had never ever thought about; how do you make RMI calls across firewalls, and why use RMI when you can achieve the same benefit from EJB. I know the answers for these questions now; do you want to know as well?

EJB. Authors begin this chapter with a table which compares some of the persistence products like EJB2.x, EJB 3.0, Hibernate and JDBC, followed by the role of EJB in J2EE illustrating the same with a big picture. There was one question which bugged me a lot when I started working on J2EE in 2001, what's the difference between EJB and Java beans? I did research on the internet and found the answer; I wish I had this book. There are many more questions on EJB 2.x as well.

JMS.  Provides most answers you need to know about JMS; from messaging concepts to two popular messaging models.

XML.  The authors in this section begin by defining XML, than continue with the difference between SAX and DOM parser, What is XPATH and later finishing this section with questions like what is your favorite XML tool, explain where your project needed XML documents.

SQL, Database, and O/R mapping. Questions covered in this section are as follows:

  • Explain inner and outer joins?
  • Explain a sub-query? How does a sub query impact on performance?
  • What is normalization? When to denormalize?
  • How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables?
  • How can you performance tune your database?
  • How will you map objects to a relational database? How will you map class inheritance to relational data model?

RUP & UML. This section covers basics on both RUP as well as UML.

Struts. I have never worked on Sturts and so I am listing a few questions which are covered in this chapter.

  • Give an overview of Struts? What is an ActionServlet? What is an Action class? What is an ActionForm? What is a Struts Validator Framework?
  • How do you upload a file in Struts?
  • Are Struts action classes thread-safe?
  • Are Struts action classes thread-safe?

Web and Application Servers. Once you finish reading this section you should be able to differentiate web server and an application server, a virtual host, clustering, JMX, portal (good explanation with a detailed diagram)

Best practices and performance considerations. Provides some tips on J2EE application server performance tuning, J2EE best practices.

Logging, testing and deployment.Gives an overview of Log4j, test phases and cycles, and a brief overview of deployment environments you should be familiar with. If you have been working on enterprise applications, this section should just be a refresher.

Personal and Behavioral/Situational. This chapter as with the one in the Java section covers some interesting questions like:

  • Have you used any load testing tools?
  • What source control systems have you used?
  • What operating systems are you comfortable with?
  • Which on-line technical resources do you use to resolve any design and/or development issues or to keep your knowledge up to date apart from Google?
  • Tell me a time where you had to deal with a difficult person? Why was this person difficult? How did you handle that person?

Key Points. This section provides some important definitions you should be able to know by now, either by memorizing the above questions or by proficiency you have using all the above technologies.

Section 3 Putting it all together section. The chapter begins by answering some basic questions like how would you go about documenting your Java/J2EE application, how would you go about designing a Java/J2EE application, and how would you go about identifying performance and/or memory issues in your Java/J2EE application. The author next moves on to explain almost every design pattern with scenarios and examples: Factory method, Singleton, Builder, Strategy, Decorator, Adapter, Visitor, Iterator, template, Composite, Façade, Observer, command, Proxy.

Section 4 Emerging Technologies/Frameworks. In this section the author answers questions on technologies like Test Driven Development (TDD), Aspect Oriented Programming (AOP), Inversion of Control (IoC) ,Annotations or attributes based programming, Spring, Hibernate, EJB 3.0 and JavaServer Faces (JSF) framework.

Section 5 Sample interview questions. This section provides some questions and useful hints for each one of those in a tabular form. Just to give you an idea here is the screen shot for the same:

Resources

Book Web Site

Some interesting questions in Joel Software can be found here.

You can also find some Java J2EE questions and answers here.

Purchase Java/J2EE Job Interview Companion on Amazon and help Javalobby.