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.
a. One Key and One Value b. Multiple Keys and Multiple associated Values c. Multiple Keys and One associated values with each d. One key and associated values.
Ans. One key and associated values.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  hadoop   bigdata   big data   map-reduce   map reduce   reduce function
Q47. Which of the following is the implementation language for Map Reduce Framework ?
a. Big Data b. Hadoop c. Java d. C++
Ans. Java
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  hadoop   bigdata   big data   map-reduce   map reduce framework
Recently asked in Sophos
Q48. Write a Method to get a map of words and their count by passing in the string
Ans. IdentityHashMap is a class that implements AbstractMap and provides a data structure with Elements having Key Value pair, just like HashMap. It is similar to HashMap except that it uses reference equality when comparing elements.
Help us improve. Please let us know the company, where you were asked this question :
Ans. filter tag speficies the filter name and respective class for handling filter action whereas filter mapping maps the filter to the url patterns ( specifying the url that needs to be intercepted )
Help us improve. Please let us know the company, where you were asked this question :
Ans. HashTable locks the complete collection to provide synchronization whereas ConcurrentHashMap only locks segments to achieve synchronization and hence better efficient and faster.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Yes, they both aim at providing synchronized access to the Map collection. The only difference is in their implementation. ConcurrentHashMap came after HashTable and hence technically more efficient as it doesn't lock the complete map while accessing it.
Help us improve. Please let us know the company, where you were asked this question :
Q56. What is the difference between Java SE Map and Apache Commons MultiMap ? How can we implement functionality similar to multimap using Java SE map ?
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 :
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 :