Handling Thread Deadlock in Java

What is a Deadlock? Deadlock is a situation that arises in case of two or more threads blocking each other’s resources while waiting for one at the same time. This condition emerges when various threads require the same resources which are acquired by one another. Now, Before moving further into deadlocks, you need to require […]

Share this article on

HashTable with Looping

We can iterate hashTable using enhanced for loop with keyset() method or by using enhanced for loop with EntrySet() method or by using iterator Case 1 : Enhanced for loop with keyset() Example import java.util.*; public class HashTableEnhancedForLoopExample { public static void main(String args[]) {   Hashtable<Integer, String> hashTable = new Hashtable<Integer, String>();     […]

Share this article on
< Previous