Meera has posted 70 posts at DZone. You can read more from them at their website. View Full User Profile

Java/J2EE Job Interview Companion

02.29.2008
| 20007 views |
  • submit to reddit
Published by: LuLu.com
ISBN: 1411668243

Reviewer Ratings

Relevance:
4

Readability:
4

Overall:
4

Buy it now

One Minute Bottom Line

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 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.

Review

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.

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.

Published at DZone with permission of its author, Meera Subbarao.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)