Table of contents

50 Important Java Core Questions

Cover Image for 50 Important Java Core Questions
  1. What is the difference between JDK and JRE?

  2. What is the difference between an interface and an abstract class?

  3. What is a classloader in Java?

  4. What is the difference between checked and unchecked exceptions?

  5. What is the difference between a String, StringBuilder, and StringBuffer?

  6. What is the difference between a static and non-static method?

  7. What is a constructor in Java?

  8. What is method overloading and method overriding?

  9. What is the difference between a stack and a queue?

  10. What is an annotation in Java?

  11. What is the difference between an ArrayList and a LinkedList?

  12. What is the difference between a Hashtable and a HashMap?

  13. What is the difference between a Set and a List?

  14. What is the difference between a binary tree and a binary search tree?

  15. What is an inner class in Java?

  16. What is the difference between a private and a protected method?

  17. What is the difference between a static and non-static variable?

  18. What is the difference between a try-catch block and a finally block?

  19. What is the difference between the equals() and == operators in Java?

  20. What is the purpose of the final keyword in Java?

  21. What is the difference between a while loop and a do-while loop?

  22. What is the difference between a break and a continue statement?

  23. What is polymorphism in Java?

  24. What is a package in Java?

  25. What is the difference between an abstract method and a concrete method?

  26. What is the purpose of the super keyword in Java?

  27. What is a static initializer block in Java?

  28. What is the purpose of the synchronized keyword in Java?

  29. What is a lambda expression in Java?

  30. What is the difference between an instance variable and a class variable?

  31. What is the difference between a public and a private class?

  32. What is the difference between an interface and a class?

  33. What is the difference between a static and non-static class?

  34. What is the purpose of the finalize() method in Java?

  35. What is the difference between a stack trace and a heap dump?

  36. What is the purpose of the transient keyword in Java?

  37. What is a thread in Java?

  38. What is the difference between a daemon thread and a user thread?

  39. What is the difference between a synchronized method and a synchronized block?

  40. What is the purpose of the volatile keyword in Java?

  41. What is the difference between a semicolon and a colon in Java?

  42. What is the difference between a public and a private constructor?

  43. What is the purpose of the extends keyword in Java?

  44. What is the purpose of the implements keyword in Java?

  45. What is the difference between a static and non-static initializer block?

  46. What is the difference between a class and an object?

  47. What is the difference between an instance method and a class method?

  48. What is the difference between a factory method and a constructor?

  49. What is the purpose of the instance of operator in Java?

  50. What is the purpose of the this keyword in Java?