Documente Academic
Documente Profesional
Documente Cultură
HashMap
4. HashMap is not syn.
5. HashMap accepts nulls based, on value retrieve key.
Ans:
HashTable HashMap
13) Java.util classes sub classes: - Array list, array, HashMap, Hashset, Hashtable(1.0) ,
linked list, properties(1.0), stacks(1.0),TreeMap, TreeSet, vector(1.0).
14) Java.util interfaces sub classes: - collection, compartor, iteration, list, map, set,
sorted set, sortedMap.
15). Diff b\w array &vector?
Ans: array: when we want to declare same data type and they are only a fixed no. of
elements we can store.
Vector we can store any type of data type and the size of vector can dynamically
increase (we can add no.of elements and it is a syn.)
16). we have arraylist if we want provide syn what we have to do?
Ans: ArrayList list = new ArrayList ();
Public static List synchronizedList (list);
17). what are the collections in java?
ans; set, list, sorted set, comparator, iterator , map, sorted map
Classes are: array list, vector, linked list.
18). What is a set?
Set is an interface extends collection interface, to represent a set of unique
elements.
24)What is Collection.
Ans: collection is