Searching for Java Interview Questions and Answers? Start from these basic core java concepts. I have written following articles specifically for helping you in answering some tough java interview questions. I have tried to put more reasoning as much as possible. After going through these interview questions, you will more confidence.
Core Java Interview Questions
Object initialization is heavy process and you are expected to know the objects, you create most of day. Java wrapper classes looks very easy from outside, just like primitives, but they are not. Learn how java surprise you with some inbuilt-tricks.
HashMap is probably most discussed and controversial topic, if you are appearing in any junior or mid level interview. You can encounter any interview question related to HashMap, if you know how it actually works internally. Let’s end this debate for once and all.
So you know now that how HashMap works? Now, learn about designing a good key for HashMap. A good way to test if you correctly understood HashMap’s internal working. And be prepare to face this your next interview question as well.
ConcurrentHashMap is advanced version of HashMap and you are expected to know it very well. There are plenty of concepts in this single class alone. This is also another good topic to learn while preparing for your next java interview.
Should I recommend you to prepare Collection framework and all it’s main classes? I guess you are already intelligent enough. Go ahead and brush up your knowledge.
You are working in java which follows all aspects of a object oriented programming. Your interviewer expect OOPs concepts in java way. Start by learning polymorphism in java.
In previous question, you learned polymorphism. Now it’s time to expand your knowledge by understanding abstraction as well. A very complicated topic for any java interview.
In this post, I have explained encapsulation as well as differentiated it with abstraction. A must read java interview question before moving forward.
You can not skip it if you are still learning the basics. Don’t trust you already knew. I will show you the correct scenarios which will help you in cracking some complex interview questions as well as case studies.
Enum are here from a long time. They are one of simplest topics if you have read this post. Not encountered in every java interview, but be sure to be ready if you face it.
If you are preparing for java interview with a telecom company or any such domain who use serialization in their application flows, then you will highly benefit from this tutorial. A very good list of do’s and don;ts with serialization in java.
Ever wondered why main() is public, static and void? Let’s clear it for the sake of your knowledge.
I myself took a long time to understand cloning in java. It really seems simple; use the Cloneable interface and override clone() method. But wait; there is much more to tell and ask in an interview. Read it thoroughly.
Java 5 bought a lot of useful classes in java.uti.concurrent package. CountDownLatch is one of those classes which are highly inquired in any java interview. In this tutorial, CountDownLatch is explained with example and concepts around it.
A very popular java interview question for beginners. I wrote this post separately because the concept is so much important. In fact, immutability is itself a very important concept in java. Feel the tip of iceberg.
Immutability is important in many design aspects and is recommended by all java gurus. Learn to make a java class immutable and be more prepare to encounter a interview question on it.
Java Concurrency Interview Questions
Defining thread safety is surprisingly tricky. At the heart of any reasonable definition of thread safety is the concept of correctness. So, before understanding the thread-safety we should understand first, this “correctness”. Learn to describe it when asked in a java interview question.
At the heart of multi-threading and concurrency, there lies the concepts of locking. Locking happens at instance level as well as class level as well. Understand the whole concept in detail in this tutorial.
A very very popular java interview question. Read it quickly if you have any doubt in this simple concept. Better read it to confirm your knowledge.
Concurrency also involves the concept of atomic operations. Read this tutorial to go deeper in understanding this atomic update process taken by java. A good candidate for mid-level java interview question.
This is not new concept but is now used in multiple ways since release of java 8. Learn this sweet and very efficient algorithm to better prepare for your next interview.
If you want to learn new ways to make concurrent applications, then you simply can’t ignore thread pools and blocking queue concepts. They are the building blocks of most multi-threaded applications in today’s world. You must know these concepts if you really want to learn multi-threading in java and want to feel comfortable before your next interview.
You will learn the executors in previous link, but there are certain things you need to know for using these executors effectively in terms of performance.
A very frequently asked interview questions faced by most of the java developers at beginner level.
Another very frequent question you must remember for interview purpose.
It can come in form of a puzzle. Better be ready for it. A sample program keeping handy will benefit in interview as well as boost your confidence.
Java Interview Questions for Experienced
Above questions are must read before appearing any java interview. Still they do not provide complete coverage. You need to know more and more to perform better in interviews. I will suggest you to read more topics in following sections in given order:
A list of highly recommended best practices. They will open up your mind to think in different directions. In short, they will sharpen you weapon for your next java interview.
Solve these puzzles and play around them. You never know what will come in your way on a bad day.
Aiming for senior position in your next java interview. You MUST know these design patterns to handle some complex application design issues, which usually are discussed in all interviews now-a-days.
Still got strength to read more. Browse more java interview questions here.
Spring Interview Questions
I have tried to collect some top spring core interview questions which you face into your next technical interview.
Some top Spring AOP interview questions which you may expect in your next advanced java interview.
These Spring MVC interview questions and answers have been written to help you prepare for the interviews and quickly revise the concepts in general. I will strongly suggest you to go deeper into each concept if you have extra time.
Test Your Knowledge
So far you have been learning all different concepts in java which can come in front of you in form of interview questions. It’s time to see whether you are prepared or not. Go through some real questions asked from Sri, in his interview with Oracle corporation.
Nikhil have 6 years of experience as java/j2ee developer and he was planning to change company. I suggested him these intermediate level interview questions.
Every programming language has its quirks. This book reveals the oddities of the Java programming language through programming puzzles.
Java Concurrency in Practice provides you with the concepts and techniques needed to write safe and scalable Java programs for today’s–and tomorrow’s–systems.
Effective Java, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.