Tuesday 8 November 2011

Java interview questions: - Mention differences between Enumeration, ArrayList, Hashtable, Collections and Collection.

Following is the differences between Enumeration, ArrayList, Hashtable, Collections and Collection for the Java interview questions asked by the interviewer.
  • Enumeration: It is series of elements. It can be use to enumerate through the elements of a vector, keys or values of a hashtable. Used for read only operations on collections.
  •  ArrayList: It is re-sizable array implementation. Implements List interface It permits all elements, including null. It is not thread -safe.
  •  Hashtable: It maps key to value. You can use non-null value for key or value. It is part of group Map in collection.
  •  Collections: It implements Polymorphic algorithms which operate on collections.
  •  Collection: It is the root interface in the collection hierarchy.
See the following video which will show us practically Inheritance between beans and Spring: -



Visit for more  Java interview questions

Regards,

Also visit for more author’s blog on Java interview questions

No comments:

Post a Comment