Questions Java (part 2)
41. What are functional interfaces in Java?
42. What is Optional class in Java 8?
43. What is the Stream API in Java 8?
44. What is method reference in Java 8?
45. What is the difference between Serialization and Deserialization?
46. What is the transient keyword in Java?
47. What is reflection in Java?
48. What is the difference between composition and inheritance?
49. What is encapsulation and how do you achieve it?
50. What is polymorphism and how is it implemented in java?
51. What is the difference between static and instance variables?
52. What is method hiding in Java?
53. What is the difference between this and super keywords?
54. Can you override private methods in Java?
55. What is constructor overloading?
56. What happens if you don't provide a constructor in a class?
57. What is the difference between default and protected access modifiers?
58. What is the instanceof operator used for?
59. What is the difference between break and continue statements?
60. What is the switch statement and how does it work?
61. What is the difference between for loop and enhanced for loop?
62. What is the difference between while and do-while loops?
63. What are nested classes in Java?
64. What is the difference between static nested class and inner class?
65. What is an anonymous class in Java?
66. What is the difference between local class and anonymous class?
67. What is package in Java and why is it used?
68. What is the import statement and how does it work?
69. What is the classpath in Java?
70. What is the main method and why is it static?
71. What is the difference between StringTokenizer and split() method?
72. What is the difference between Vector and ArrayList?
73. What is the difference between Stack and Queue?
74. What is LinkedHashMap and when would you use it?
75. What is WeakHashMap in Java?
Questions Java (part 2) 1
76. What is the difference between fail-fast and fail-safe iterators?
77. What is the difference between synchronized block and synchronized
method?
78. What is ThreadLocal class in Java?
79. What is the difference between notify() and notifyAll()?
80. What is thread pool in Java?
Questions Java (part 2) 2