Multiple choice

How many constructors of LinkedHashMap class are there in Java collections framework?

  1. 6

  2. 5

  3. 4

  4. 3

  5. 2

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This is the correct choice because there are 3 constructors of LinkedHashMap class. These are:LinkedHashMap(): creates a default Map with default initial capacity and loadfactor LinkedHashMap(Map : m): creates a map with the existing map m LinkedHashMap(int capacity, float loadfactor, Boolean accessorder): creates a map with specified initial capacity, load factor and access order of elements