CodesJava

Easy learning with example program codes

how hashset works internally in java?

HashSet: HashSet extends AbstractSet and implements the Set interface. It not maintains any order for its elements. It uses hash table for storage. HashSet uses HashMap internally… Read More
Posted in Java   

How hashmap stores null key?

HashMap: HashMap extends AbstractMap class and implements the Map interface. It contains the elements in key-value pair form. It not maintains any order for its elements. It… Read More
Posted in Java   

how to resolve collision in hashmap?

HashMap: HashMap extends AbstractMap class and implements the Map interface. It contains the elements in key-value pair form. It not maintains any order for its elements. It… Read More
Posted in Java   

How put and get works in HashMap?

HashMap: HashMap extends AbstractMap class and implements the Map interface. It contains the elements in key-value pair form. It not maintains any order for its elements. It… Read More
Posted in Java   

how hashmap works internally in java?

HashMap: HashMap extends AbstractMap class and implements the Map interface. It contains the elements in key-value pair form. It not maintains any order for its elements. It… Read More
Posted in Java   

hashcode method in java

The hashCode() method in java is an Object class method. It returns a hash code value (an integer number) for the object which represents the memory address… Read More
Posted in Java   

equals method in java

The equals() method in java is an Object class method. It return true for two non-null reference values x and y if and only if x and… Read More
Posted in Java   

how to get current thread in java?

The currentThread() method of Thread class is used to get current thread in java. It is a static method. Syntax of currentThread() method: public static Thread currentThread()… Read More
Posted in Java   

can we override run method in thread?

run() method public void run() : It run method is used to perform operations by thread. Yes, we can override run method in thread but start method… Read More
Posted in Java   


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap