---Advertisement---

Java Interview Questions-Infosys(Beginners)

By Siva

Published On:

---Advertisement---

1. What are the key differences between String, CharSequence, and StringBuilder?

2. How do you prevent NullPointerException in Java effectively?

3. What is a ClassNotFoundException vs NoClassDefFoundError?

4. What is the role of the java.lang.Object class and its common methods?

5. How does type erasure work in Java generics?

6. What are wildcards in generics (? extends, ? super) and when should you use them?

7. What are the limitations of Java generics?

8. How can you achieve method chaining in Java?

9. What are the differences between composition and inheritance in OOP?

10. What is double-checked locking and how is it used in singletons?

---Advertisement---

Leave a Comment