Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

Java Based Questions

The document outlines key concepts and features of Java, including its memory model, access modifiers, and differences between JDK, JRE, and JVM. It also covers object-oriented programming principles, exception handling, collections framework, multithreading, Java 8 features, and advanced topics like reflection and design patterns. Each section poses specific questions that delve into the fundamental aspects of Java programming.

Uploaded by

ppal7191
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Java Based Questions

The document outlines key concepts and features of Java, including its memory model, access modifiers, and differences between JDK, JRE, and JVM. It also covers object-oriented programming principles, exception handling, collections framework, multithreading, Java 8 features, and advanced topics like reflection and design patterns. Each section poses specific questions that delve into the fundamental aspects of Java programming.

Uploaded by

ppal7191
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Core Java

1. What are the main features of Java?


2. Explain the Java memory model (stack vs heap).
3. What is the difference between JDK, JRE, and JVM?
4. What are the different access modifiers in Java?
5. What is the difference between == and .equals()?
6. What are wrapper classes in Java?
7. What is autoboxing and unboxing?
8. What are sta c variables and methods?
9. What is the final keyword in Java?
10. What is the difference between String, StringBuilder, and StringBuffer?

Object-Oriented Programming (OOP)


11. What are the four pillars of OOP?
12. Explain method overloading vs method overriding.
13. What is the use of super and this keywords?
14. What is a constructor? Can constructors be overloaded?
15. What is abstrac on and how is it implemented in Java?
16. What is the difference between an interface and an abstract class?

17. Can a class implement mul ple interfaces? Why?


18. What is polymorphism? Give an example.

Excep on Handling
19. What is the difference between checked and unchecked excep ons?
20. What is the finally block? Will it always execute?
21. What are custom excep ons? How do you create one?
22. Explain try-with-resources.

Collec ons Framework


23. What is the difference between ArrayList and LinkedList?
24. What is the difference between HashMap, TreeMap, and LinkedHashMap?

25. What is the difference between HashSet and TreeSet?


26. What is the difference between Iterator and ListIterator?
27. How does HashMap work internally?
28. What are Comparable and Comparator interfaces?

Mul threading and Concurrency


29. What is the difference between Thread and Runnable?
30. What is the difference between synchronized method and block?
31. What is the use of vola le keyword?
32. What is a deadlock? How can you prevent it?
33. Explain the Executor framework in Java.
34. What are the differences between wait(), no fy(), and no fyAll()?

Java 8 and Func onal Programming


35. What are lambda expressions?
36. What are func onal interfaces?
37. What are streams in Java 8?

38. What is the difference between map() and flatMap()?


39. What is Op onal? Why is it used?
40. Explain method reference in Java 8.

Miscellaneous / Advanced Topics


41. What is reflec on in Java?
42. What is garbage collec on? How does it work in Java?
43. What are annota ons in Java?
44. What is a singleton class? How do you implement it?
45. What are inner classes and anonymous classes?
46. How does class loading work in Java?
47. What is the difference between ==, .equals(), and compareTo()?

48. What is immutability? How do you make a class immutable?


49. What is serializa on and deserializa on in Java?
50. What are design pa erns in Java? Can you explain one?

You might also like