Core Java Interview Questions and Answers
Difficulty Level: AllBeginnerIntermediateExperienced/Expert
Ques 1. What is phantom memory?
Ques 2. How can I swap two variables without using a third variable?
Ques 3. Explain working of Java Virtual Machine (JVM)?
Ques 4. Why String is immutable or final in Java?
Ques 6. Can you call one constructor from another if a class has multiple constructors?
Ques 7. What are some alternatives to inheritance?
Ques 8. When can an object reference be cast to an interface reference?
Ques 9. What is the algorithm used in Thread scheduling?
Ques 10. What are the threads will start, when you start the java program?
Ques 11. What are the approaches that you will follow for making a program very efficient?
Ques 12. What is an object's lock and which object's have locks?
Ques 14. What is hash-collision in Hashtable and how it is handled in Java?
Ques 15. Can an inner class declared inside of a method access local variables of this method?
Ques 17. How do I convert a numeric IP address like 192.18.97.39 into a hostname like java.sun.com?
Ques 20. What is reflection API? How are they implemented?
Ques 22. What is reason of NoClassDefFoundError in Java?
Ques 23. How to resolve NoClassDefFoundError?
Ques 24. Difference between ClassNotFoundException and NoClassDefFoundError in Java?
Ques 25. What is java.lang.OutOfMemoryError in Java?
Ques 26. Types of OutOfMemoryError in Java.
Ques 28. How HashMap works in Java?
Ques 30. How to use Comparator and Comparable in Java? With example.
Ques 31. What is dead lock in thread?
Ques 32. What is thread pool in java?
Ques 33. What is concurrency in java?
Ques 34. What is Dictionary Class in Java?
Ques 35. What is Reference Handler Thread in Java?
Ques 36. What is Main thread in Java?
Ques 37. What is Signal Dispatcher thread in Java?