· Given,
Object a = new LinkedHashSet();
Then a instanceof HashSet is true because linkedHashSet extends HashSet.
· We get similar results with LinkedHashMap and HashMap since LinkedHashMap extends HashMap.
· Remember these points
Ø Collection → interface
Ø Collections and Arrays→ classes providing utility methods for various operations.
· ListIterator is an interface which extends only Iterator interface not List interface
· Enumeration interface was introduced in java 1.0
· Iterator was added in java 1.2
· Iterator methods : -
Ø hasNext();
Ø next();
Ø remove(Object);
· Enumeration interface has methods
Ø hasMoreElements();
Ø nextElement();
· the default number of rows visible in a List is ‘4’.
· When we add the same element again into a Set using add(Object) then the subsequent additions of the element returns a boolean false in its reurn part.