Core-Java-Concep
Core-Java-Concep
14. Explain the four pillars of OOP: inheritance, encapsulation, polymorphism, and
abstraction. Can you give an example for each?
15. What is the difference between method overloading and method overriding?
16. Can you explain what an abstract class is? How does it differ from an interface?
17. What are the rules for overriding a method in Java?
18. What are super and this in Java? How are they used?
22. What is a Thread in Java, and how can you create one?
23. What are Runnable and Callable interfaces, and what is the difference?
24. What is the ExecutorService, and how does it help manage threads?
25. How does wait(), notify(), and notifyAll() work in Java multithreading?
26. What is synchronization in Java? How does the synchronized keyword work?
27. What are volatile and transient keywords in Java?
Exception Handling
33. What is the difference between a Set, a List, and a Map in Java?
34. Explain about ArrayList with an example?
35. What are the main differences between HashMap and Hashtable?
36. What is the difference between ArrayList and LinkedList? When would you use one
over the other?
37. What is the difference between Comparable and Comparator interfaces?
38. How does HashMap work internally?
39. Can you explain the concept of hashCode() and equals()?
40. What is Iterator?
41. What is Difference between Iterator and ListIterator?
42. What is Difference between fail-fast and fail-safe?
Lambda Expressions