JAVA common interview questions

 

  1. What is Java?
  2. What are the differences between Java and C++?
  3. What are the basic data types in Java?
  4. What is a class in Java?
  5. What is an object in Java?
  6. What is an interface in Java?
  7. What is an abstract class in Java?
  8. What is inheritance in Java and how is it implemented?
  9. What is polymorphism in Java and how is it implemented?
  10. What is encapsulation in Java and how is it achieved?
  11. What is the difference between the static and non-static methods in Java?
  12. What is a constructor in Java and how is it used?
  13. What is an exception in Java and how is it handled?
  14. What is a thread in Java and how is it used?
  15. What is the difference between final, finally, and finalize in Java?
  16. What is a package in Java and how is it used?
  17. What is the difference between JDK and JRE in Java?
  18. What is the difference between an ArrayList and a LinkedList in Java?
  19. What is a map in Java and how is it used?
  20. What is the difference between a hashmap and a hashtable in Java?
  21. What is the difference between a stack and a queue in Java?
  22. What is the difference between the throw and throws keywords in Java?
  23. What is the difference between an abstract class and an interface in Java?
  24. What is the difference between a checked exception and an unchecked exception in Java?
  25. What is the purpose of the "final" keyword in Java?
  26. What is the purpose of the "static" keyword in Java?
  27. What is the purpose of the "synchronized" keyword in Java?
  28. What is the purpose of the "volatile" keyword in Java?
  29. What is a singleton class in Java?
  30. What is the difference between a shallow copy and a deep copy in Java?
  31. What is a marker interface in Java?
  32. What is a lambda expression in Java?
  33. What is a functional interface in Java?
  34. What is a stream in Java and how is it used?
  35. What is the difference between an iterator and a list iterator in Java?
  36. What is a heap and how is it used in Java?
  37. What is a garbage collector in Java and how does it work?
  38. What is the difference between a process and a thread in Java?
  39. What is the difference between an applet and an application in Java?
  40. What is the difference between the Comparable and Comparator interfaces in Java?
  41. What is the difference between the equals() and == operators in Java?
  42. What is the purpose of the super keyword in Java?
  43. What is the purpose of the this keyword in Java?
  44. What is the difference between the private, protected, and public access modifiers in Java?
  45. What is a JAR file in Java and how is it used?
  46. What is the purpose of the Class.forName() method in Java?
  47. What is the difference between the String, StringBuilder, and StringBuffer classes in Java?
  48. What is the purpose of the assert keyword in Java?
  49. What is the difference between the try-with-resources and the try-catch-finally statements in Java?
  50. What is a diamond operator in Java and how is it used?

Comments

Popular posts from this blog

How to study Data Structure for Campus Placement?

How to learn Python programming?

Queue data structure multiple choice questions with answers