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