Interview Questions and Answers for 'Map' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Newest

   
 Q61. Isnt the use of HashTable and ConcurrentHashMap the same, i.e providing synchronized map collection ?Core Java
Ans. Both provide the thread safety but the actual difference come when talk about performance. CHM gives best performance when no of writer threads are less in number.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     synchronized collections  hashtable  ConcurrentHashMap     Asked in 1 Companies


 Q62. How many read and write operations are provided at the same time by ConcurrentHashMaps ?Core Java
Ans. ConcurrentHashMaps provide unlimited read operation fro multi threaded environment. For write operation only one thread can change value for particular segment of map.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ConcurrentHashMap     Asked in 1 Companies


 Q63. Explain different inheritance mapping strategies with JPA / Hibernate.Hibernate
Ans. table per hierarchy
table per concrete class
table per sub class

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hibernate mapping  hibernate associations     Asked in 4 Companies


 Q64. Is HashMap Synchronized ?Core Java
Ans. No HashMap isn't synchronized. ConcurrentHashMap and Hashtable are synchronized.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hashmap  synchronization


 Q65. Is ConcurrentHashMap synchronized ?Core Java
Ans. Yes, ConcurrentHashMap is synchronized.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ConcurrentHashMap


 Q66. Difference between TreeMap and SortedMap ?Core Java
Ans. sortedMap is an interface ,while TreeMap is an implementation of sortMap.

We can not create an instance of sortedMap but we can create an instance of treeMap

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     treemap  sortedmap


 Q67. Difference between HashMap and Dictionary in Java ?Core Java
Ans. HashMap implements the Map interface while the Dictionary does not.

HashMap was introduced after HashTable and Dictionary.

Dictionary is currently obsolete in java.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hashmap  dictionary class


 Q68. Which of the following collections stores its elements in natural sorting order ?Core Java
a. HashMap
b. LinkedHashMap
c. TreeMap
d. EnumMap

Ans.c. TreeMap

 Q69. Semaphores are used to solve problem of ... Operating system
a. Race Condition
b. Process Synchronization
c. Mutual Exclusion
d. All of above

Ans.d. All of above

previous 30   

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: