Core Java Interview Questions and Answers (2024)

1. What is Java?

2. What are the differences between C++ and Java?

3. List the features of Java Programming language

4. What do you understand by Java virtual machine?

5. What is the difference between JDK, JRE, and JVM?

6. How many types of memory areas are allocated by JVM?

7. What is JIT compiler?

8. What is the platform?

9. What are the main differences between the Java platform and other platforms?

10. What gives Java its write once and run anywhere nature?

11. What is classloader?

12. Is delete, next, main, exit or null keyword in java?

13. If I dont provide any arguments on the command line, then what will the value stored in the String array passed into the main() method, empty

14. What if I write static public void instead of public static void?

15. What is the default value of the local variables?

16. What are the various access specifiers in Java?

17. What is the purpose of static methods and variables?

18. What are the advantages of Packages in Java?

19. What is object-oriented paradigm?

20. What is an object?

21. What is the difference between an object-oriented programming language and object-based programming language?

22. What will be the initial value of an object reference which is defined as an instance variable?

23. What is the constructor?

24. How many types of constructors are used in Java?

25. What is the purpose of a default constructor?

26. Does constructor return any value?

27. Is constructor inherited?

28. Can you make a constructor final?

29. Can we overload the constructors?

30. What do you understand by copy constructor in Java?

31. What are the differences between the constructors and methods?

32. What is the static variable?

33. What is the static method?

34. What are the restrictions that are applied to the Java static methods?

35. Why is the main method static?

36. Can we override the static methods?

37. What is the static block?

38. Can we execute a program without main() method?

39. What if the static modifier is removed from the signature of the main method?

40. What is the difference between static (class) method and instance method?

41. Can we make constructors static?

42. Can we make the abstract methods static in Java?

43. Can we declare the static variables and methods in an abstract class?

44. What is this keyword in java?

45. What are the main uses of this keyword?

46. Can we assign the reference to this variable?

47. Can this keyword be used to refer static members?

48. How can constructor chaining be done using this keyword?

49. What are the advantages of passing this into a method instead of the current class object itself?

50. What is the Inheritance?

51. Why is Inheritance used in Java?

52. Which class is the superclass for all the classes?

53. Why is multiple inheritance not supported in java?

54. Can we overload the constructors?

55. What do you understand by copy constructor in Java?

56. What are the differences between the constructors and methods?

57. What is the static variable?

58. What is the static method?

59. What are the restrictions that are applied to the Java static methods?

60. Why is the main method static?

61. Can we override the static methods?

62. What is the static block?

63. Can we execute a program without main() method?

64. What if the static modifier is removed from the signature of the main method?

65. What is the difference between static (class) method and instance method?

66. What is aggregation?

67. What is composition?

68. What is the difference between aggregation and composition?

69. Why does Java not support pointers?

70. What is super in java?

71. How can constructor chaining be done by using the super keyword?

72. What are the main uses of the super keyword?

73. What are the differences between this and super keyword?

74. Is Java Platform Independent if then how?

75. Can you use this() and super() both in a constructor?

For latest job updates join Telegram Channel: https://t.me/sateeshm