Create Own Marker Interface in Java

Marker/Tagging Interface: It’s a kind of interface which has no method is known as marker interface. Serializable, Clonnable is the example of marker interface   Use of Marker Interface: Marker Interfaces are used to indicate something to compiler/JVM. If JVM see that a class is a object of Marker Interface then it will perform some special operation. Take an example […]

» Read more

How HashSet works internally

Let us understand why it is always the question How HashSet works internally instead of just “How HashSet works?”? The reason is when we ask “How HashSet works?” the answer is as simple as below A set is a well-defined collection of unique objects. A set will never contain duplicate elements. So HashSet does not allow any duplicates in its […]

» Read more

How HashMap works internally

Do you know? How hashMap find the exact index from bucket for key value pair. Its very much important as we growing our carrier and Interviewers expect such details from you. But everyone says its find from hashCode but its not true, Suppose HashCode is 12000 means hashMap store the data at that location, How come its possible as hashMap can […]

» Read more
1 2 3 4