How many constructors of LinkedHashMap class are there in java collections framework?
Reveal answer
Fill a bubble to check yourself
How many constructors of LinkedHashMap class are there in java collections framework?
6
5
4
3
2
This is the correct answer, as there are 5 constructors of LinkedHashMap class. These are:- LinkedHashMap():- constructs an empty insertion-ordered LinkedHashMap instance with the default initial capacity (16) and load factor (0.75), LinkedHashMap(int initialCapacity):- constructs an empty insertion-ordered LinkedHashMap instance with the specified initial capacity and a default load factor (0.75), LinkedHashMap(int initialCapacity, float loadFactor):- constructs an empty insertion-ordered LinkedHashMap instance with the specified initial capacity and load factor. LinkedHashMap(int initialCapacity, float loadFactor, boolean accessOrder):- constructs an empty LinkedHashMap instance with the specified initial capacity, load factor and ordering mode, and LinkedHashMap(Map<? extends K,? extends V> m):- constructs an insertion-ordered LinkedHashMap instance with the same mappings as the specified map.