How to prepare for Java Interviews? Topics, Books, and Questions

Java Interviews are a little bit different than traditional programming interviews on tech giants and product based companies like Google, Amazon, Microsoft, or Facebook. First, even though it has questions from Data Structure and Algorithms e.g. String or Array, you can still manage to clear Java interviews if you are not an expert on them. The questions are a little bit easier and more practical than those companies. Another very important thing about Java interviews are questions based upon Java programming language and JDK API. Since Java is also an Object oriented programming language, you will find lots of OOP questions there. Since Java is primarily used as application programming language, the focus is aligned accordingly with questions mostly focusing on API, Java concepts, and design patterns.

Also, Java interviews change a lot depending upon candidate's experience. For example, junior developers with 1 to 2 or 3 to 4 years of experience will see more questions on topics like Java fundamentals, API, data structure and algorithms, more senior developers i.e. Java programmers with 5 to 6 years of experience will find more questions on concurrent programming, Java concurrency API, JVM internals, GC tuning and Java Performance. So your preparation should be aligned with your experience.

Also, Java EE interviews are totally different than core Java interviews because core Java interviews are mostly focused on core Java concepts like Concurrency, Collections, and JVM internals, while Java EE interviews are based upon framework like JSF, Spring, Hibernate and others.

The best way to prepare for Java interviews is to buy a book and read blogs like this. Though there is no substitute for the experience you can still manage to sail through by carefully preparing for you Java interviews.




Which topics to prepare for Java Interviews?

As I told, the importance of topics depends upon candidate's experience. I would ask more questions from Java fundamentals like String, Collections, equals() and hashcode and OOP concept to a fresher or Junior Java developers of 2 years experience, but those topics will be too trivial for Java developer of 4 to 5 years experience. For those, I prefer to ask Concurrency, JVM internals, Garbage Collection, testing and design patterns. Another thing which decides which topic you should prepare for your interview is the Job description.

There is no better guide than Job description to prepare for relevant topics. For example, if you are going to work for a core Java multi-threading based application then you should prepare well for core Java topics like multi-threading and concurrency, Java Collections, Generics, Enum, GC Algorithms and JVM internals. Similarly, if you are going to work for Java Web Service application than preparing about REST and SOAP, XML, JSON and other relevant topics.

For Java, web application developers, JSP, Servlet, Spring, and Hibernate are more important than multi-threading and JVM internals. Similarly for an Android developer, apart from knowledge of Java fundamentals, knowing Android API is more important.


Nevertheless here is the list of topics I suggest to any Java developer who is serious about interviews.
  • Java Fundamentals
  • Object Oriented Concepts
  • Data Structure and Algorithms
  • Multithreading, concurrency, and thread basics
  • Date type conversion and fundamentals
  • Garbage Collection
  • Java Collections Framework
  • Array
  • String
  • GOF Design Patterns
  • SOLID design principles
  • Abstract class and interface
  • Java basics e.g. equals and hashcode
  • Generics and Enum
  • Java IO and NIO
  • Common Networking protocols
  • Data structure and algorithm in Java
  • Regular expressions
  • JVM internals
  • Java Best Practices
  • JDBC
  • Date, Time and Calendar
  • XML Processing in Java
  • JUnit
  • Programming questions


Apart from these topics, you could also take help from books like Java interview exposed and the Cracking the coding interview. These are great books written specially from interview perspective and it will give you a good idea of what to expect on Java programming job interviews. You will also find questions asked from various tech companies like Facebook, Google and Investment banks like Barclays, Citi, Deutsche bank, Morgan Stanley and others.

For a more serious developer who wants to become an expert and not just to focus on clearing an interview, I suggest you take a look at my 12 advanced Java books for experienced programmers article. It contains books for every important topic in Java.

How to prepare for Java Interviews?



New books For Java Interviews

Recently I come across some excellent books to prepare for core Java and web developer interviews, these books focus more on core Java concepts like multi-threading, collections, Java fundamentals etc, but also touches web development concepts e.g. web service, spring, hibernate, JSP, Servlet etc.  These books are both cheap, will cost you less than $15 but gives you enough practice and ideas to do well on your Java interviews. Though nothing can beat the true experience and constant learning, if you are short of experience and not in touch with Java for more than a year then you can use these books to prepare better for your Java interviews.


Java Interview Guide: How to Build Confidence With a Solid Understanding of Core Java Principles
This is an excellent book to get an idea about Java interviews. It is very well organized and covers almost all the topics we have discussed here and probably more e.g. web services, spring, hibernate, JDBC etc. It is equally useful for both entry-level Java programmer and experienced Java developer interviews.

Java Interview Guide book




Java Interview Bootcamp: The Complete Guide To Finding And Landing Your Next Java Developer Role 
This is a nice, small books, around 50 pages of interview questions, ideal if you have Java interviews in a couple of days or hours. Even though the book is small, it touches many important areas of Java e.g. concurrency, collection, performance tuning, garbage collection and common programming concepts e.g. big O notation, data structure, and algorithms etc. In short, if you are running out of time for your next Java interviews, this book will help you.

Java Interview BootCamp book


That's all bout how to prepare for Java interviews guys.  The Java ecosystem is vast and but depending upon Job description you can further narrow down your preparation areas e.g. if you are going for core Java interviews then you should focus more on core java concepts e.g. multi-threading, collections, and JVM internals. Similarly, if you are going for Java web developer interview then you should focus more on web development aspect e.g. security, MVC frameworks like Spring, Struts and ORM frameworks like Hibernate and iBatis.


Other Java Interview resources for you
  • 133 Java Interview Questions from last 5 years (list)
  • 15 Data Structure and Algorithm Interview Questions (list)
  • 10 Spring Framework Interview Questions (list)
  • 20 Hibernate Framework Interview Questions with Answers (list)
  • 50 Java Concurrency Interview Questions (list)
  • 25 Java Collection Interview Questions (list)
  • 10 RESTful Web Service interview Questions for Java developers (list)

Thanks for reading this article, if you have found this article useful and worth sharing then please share with your friends and colleagues. If you have any suggestion or feedback or if you want to share any of your personal tips which helped you to do well in Java interview then please drop a comment.



3 comments :

Post a Comment