Blog Archives
Page 1 of 2
1 2

06: HashMap & HashSet and how do they internally work? What is a hashing function?

HashMap & HashSet are not only one of the frequently used data structures, but also one of the popular interview topics. Q1. How does a HashMap store data? A1. As key/value pairs. You can store and retrieve values with the keys. … Read more ›...

Members Only Content
Log In Register Home


5 Java Object class methods interview questions & answers

Q1. What are the non-final methods in Java Object class, which are meant primarily for extension? A1. The non-final methods are equals( ), hashCode( ), toString( ), clone( ), and finalize( ). These methods are meant to be overridden. … Read more ›...

Members Only Content
Log In Register Home


8 Java immutable objects interview questions & answers

Best Practice: “Classes should be immutable unless there’s a very good reason to make them mutable….If a class cannot be made immutable, limit its mutability as much as possible.” — by Joshua Bloch Q1. What is an immutable object? Q2. Immutable objects are objects whose state (the object’s data) cannot...

Members Only Content
Log In Register Home


Java enum interview questions & answers

Covers the power of enumand 3 design patterns that can be applied with the help of enums. Q1. Why is it a best practice to use enums over static final int or String constants? A1. 1) static final allows invalid values. … Read more ›...

Members Only Content
Log In Register Home


Java serialization, cloning, and casting interview Q&A

Q1. Which Java interface must be implemented by a class whose instances are transported via a Web service? a. Accessible b. BeanInfo c. Remote d. Serializable A1. Answer is “d”. Q2. What is serialization? A2. … Read more ›...

Members Only Content
Log In Register Home


Page 1 of 2
1 2

800+ Java Interview Q&As Menu

Top