Sunday 28 June 2015

Java Interview Questions for 3 to 4 Years Experienced Programmers

Java Interview Questions for 3 Years Experienced Programmers

Here is the list of some useful Java interview questions for experienced Java programmers having experience in range of 2 to 5 years. As an experienced developer you are expected to learn about OOP concepts, Java basics,  Java Collection framework, Multi-threading and Concurrency utilities introduced in Java 5 and 6, Debugging Java application, Algorithm and Data structure, Some questions on design patterns, JVM and Garbage collection and couple of puzzles. Actually its mix of everything you do in your day to day work.

If you are going for Java developer with some exposure on web development you will also be asked about popular Java frameworks like Spring, Hibernate, Struts 2.0 and others. If you have more than 5 years of experience you can also expect questions about build tools like Maven, ANT and Gradle, Java best practices, Unit testing and JUnit and your experience about solving production issues.

One of the most common question I have faced is talking about the last production problem you have faced and how did you solved it. If you are asked same question, give them step by step detail, right from analyzing problem to tactical fix to strategic solution.

In this article, I am going to share my list of Java Interview question for Java guys having 2 to 5 years of experience. Since I had similar experience couple of year ago, I know what questions are asked and keeping a list for your own always helps when you start looking for new challenge in your career.
I am not providing answers of these question in this post due to two reasons, questions are quite simple and you guys probably know the answer, second providing answer means I cannot use this post for my own preparation later, which is more important. Though, I could write another article answering all these question if anyone request or I feel people need it.



Java Interview Questions for 2 to 5 years Experienced

This list contains questions from different topics e.g. OOP concepts, multi-threading and concurrency, Java collections, Web services, Spring, Hibernate, Database and JDBC, it doesn't cover all topics you need to prepare. I will add few more topics later when I have some time, for now, try to answer these questions without doing Google :)


Java Interview questions on OOP Concepts

  1. What is difference between loose coupling and tight coupling?
  2. What is difference between cohesion and coupling?
  3. What is Liskov Substitution principle? Can you explain with example?
  4. What is difference between abstract class and interface in Java?
  5. What is difference between composition, aggregation and association?


Java Interview questions on Collections

  1. Difference between List, Set and Map in Java?
  2. Difference between synchronized and concurrent collection in Java?
  3. How get method of HashMap works in Java?
  4. How ConcurrentHashMap is different than Hashtable? How it achieve thread-safety?
  5. When to use LinkedList over ArrayList in Java?


Java Interview questions on Concurrency

  1. How notify and notifyAll work, and the difference between them. Why prefer notifyAll to notify?
  2. What is a race condition and how do you avoid it?
  3. What is a deadlock and how do you avoid it?
  4. What are some of the high-level concurrency classes provided by java.util.concurrent and how do they work?


Interview questions on Database

  1. How do you prevent SQL injection attacks?
  2. What is difference between WHERE and HAVING clause?
  3. What are transactions? What is ACID?
  4. Difference between truncate, delete and drop clause in SQL?
  5. What are window functions? how they work?

Java Interview questions on Hibernate

  1. When is it better to use plain SQL instead of ORM?
  2. Difference between sorted and ordered collection?
  3. How second level cache works?

Java Interview questions on Web Services

  1. What is the difference between SOAP-based web services and REST-based web services?
  2. What is SOAP Envelope?
  3. How to implement security in RESTful web service?
  4. What is Payload in REST?


Thank you guys for now. I am sorry but I need to head off for some work, I will add more questions later. Let me know if you have also asked these questions before. If anyone knows answer, can also post as comment.

Good luck for your Java Interview.

No comments:

Post a Comment