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
- What is difference between loose coupling and tight coupling?
- What is difference between cohesion and coupling?
- What is Liskov Substitution principle? Can you explain with example?
- What is difference between abstract class and interface in Java?
- What is difference between composition, aggregation and association?
Java Interview questions on Collections
- Difference between List, Set and Map in Java?
- Difference between synchronized and concurrent collection in Java?
- How get method of HashMap works in Java?
- How ConcurrentHashMap is different than Hashtable? How it achieve thread-safety?
- When to use LinkedList over ArrayList in Java?
Java Interview questions on Concurrency
- How notify and notifyAll work, and the difference between them. Why prefer notifyAll to notify?
- What is a race condition and how do you avoid it?
- What is a deadlock and how do you avoid it?
- What are some of the high-level concurrency classes provided by java.util.concurrent and how do they work?
Interview questions on Database
- How do you prevent SQL injection attacks?
- What is difference between WHERE and HAVING clause?
- What are transactions? What is ACID?
- Difference between truncate, delete and drop clause in SQL?
- What are window functions? how they work?
Java Interview questions on Hibernate
- When is it better to use plain SQL instead of ORM?
- Difference between sorted and ordered collection?
- How second level cache works?
Java Interview questions on Web Services
- What is the difference between SOAP-based web services and REST-based web services?
- What is SOAP Envelope?
- How to implement security in RESTful web service?
- 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