SEARCH KEYWORD -- ConcurrentHashMap
Both ConcurrentHashMap and Hashtable are Collection classes for storing key value pairs and they both provide fast element search with a supplied key. They have much in common. However, we will not discuss the similarities between them here, instead we will focus on the differences between them. ConcurrentHashMap and Hashtable are both thread safe. But the mechanism for thread safe is different between them. Hashtable is synchronized, it utilizes the synchronization mechanism; while ConcurrentHa...
ConcurrentHashMap and Collections.synchronizedMap() both provide thread-safe operations of collections of data. They are used in multithreaded programs to provide both thread safety and performance improvements. In many cases, we can use either of them. But the realization of thread safety is different for these two implementations. ConcurrentHashMap will create an HashEntry array internally to store the elements passed in from a Map, while Collections.synchronizedMap() will return a Synchroni...
Currently there are many articles online which summarize the list of Java interview questions. Some cover lots of basic questions and some cover some specific questions in specific area such as multithreading. In this post, we will not cover the really basic questions, we will cover something different. For basic question, you can read Java Interview Questions。 Basic What is primitive data type? How many primitive data types in Java? What are they? -- A primitive type is predefined...
This tutorial explains about what are the differences between Iterators and Enumeration and similarity of both interface which may be asked in a core java interview. Functionalities of both Iterator & Enumeration interfaces are similar that means both generates a series of all elements of the object which is to have its values iterated that can be traversed one at a time using next() method incase of Iterator and nextElement() method incase of Enumeration. The more powe...
- Five Prevailing Trends in iOS Application Development
- Why do I need a debugger?
- Resizing and Watermark of Images
- How to Keep Your Java Cloud Apps Running Even In a Cloud Outage
- Celebrity News
- Use of java in the banking sector
- Things to Look for in Microsoft .NET Framework 4.7
- You should publish your contributions of Open Source, even it’s not required
- How Java Technologies help in Modernization of Enterprise Applications?
- Avail Business-friendly Features of IP PBX Solutions