Top 20 Basic Java Interview Questions with Answers for Freshers with 1 to 2 years Experience

If you are grad looking for an internship position in a company which uses Java, or a fresher, just out from college and looking out for Java development position, then this post is for you. I have attended, taken and participated in a different level of Java interviews, and I can say there is a huge difference between them, which is not surprising because you obviously want to ask different level questions based upon whether the candidate is fresher or experienced. Similarly, the question at phone interview, written test, and face to face interviews, keeping this in mind, and give you always have a limited amount of time before going for any interview, It's important to prepare right set of questions.

Well, I can't guarantee that you will see questions from this set but it gives you an idea about the level of question you can expect in any Java internship or Software trainee positions.

Don't bother about multithreading and complex topic, only basic knowledge of threading is enough. Similarly, put more emphasis on the data structure, algorithms and object-oriented basics e.g. Inheritance, Composition, Encapsulation, Polymorphism etc.


Java Interview Questions for 1 to 2 years Experienced Programmers

1) What's is Polymorphism in Java or OOP? (answer)


2) Given a reference to an abstract class Shape that has an abstract method named Draw, how does Java determine which version of the draw to call? What portion is handled at runtime and what portion at compile time?  (answer)


3) what is the difference between an array and a linked list? How does this affect performance and memory usage? (answer)


4) Describe garbage collection. What do mark and sweep mean? How about generational garbage collection? (answer)


5) what is the difference between a string literal and a string object? (answer)


6) what is the difference between int and Integer? (answer)


7) what is a binary search tree?  How do you implement in Java? (answer)


8) what is a heap memory in Java? (answer)


9) how would you implement a priority queue in Java? (answer)


10) what does "Big O of n" mean in practice? Will an O(n) algorithm always outperform an O(n*n) algorithm? (answer)


Top 20 Java Interview Questions with Answers for Programmers with 1 to 2 years Experience11) What is the difference between a list and a linked list in Java? (answer)


12) What is a map in Java? (answer)


13) what is an array in Java? (answer)


14) What is a thread in Java? (answer)


15) What is a lock in Java? (answer)


16) What is a deadlock? (answer)


17) Difference between Overloading and Overriding? (answer)


18) Difference between abstract class and interface? (answer)


19) Difference between Process and Thread in Java? (answer)


20) Difference between "extends" thread and "implements" Runnable? (answer)


That's all in this list of interview questions for preparing Java internship and Software developer positions. These questions are just to give you an idea of level, which is expected from fresher’s and trainees. Keeping yourself on to a higher level will surely benefit you. Don't forget to share what kind of questions was asked of you in a fresher level interview.


Useful Resources for Preparing Java Interviews
Java Interview Guide: 200+ Interview Questions and Answers
Preparing For a Job Interview By John Sonmez
Spring Framework Interview Guide - 200+ Questions & Answers
Cracking the Coding Interview - 189 Questions and Answers
Java Programming Interview Exposed by Markham
Data Structure and Algorithms Analysis for Job Interviews

Thanks for reading this article so far. If you like this article then please share with your friends and colleagues. If you have any questions or feedback then please drop a note. 

No comments:

Post a Comment