Collection Classes: Object Oriented Programming Using Java
Collection Classes: Object Oriented Programming Using Java
• collections framework,
• legacy collection classes,
• event model,
• date and time facilities,
• internationalization, and
• miscellaneous utility classes.
• All the operations that you perform on a data such as searching, sorting,
insertion, manipulation, deletion etc. can be performed by Java Collections.
Types of List:
1. ArrayList
2. LinkedList
3. Vector
• ArrayList class extends AbstractList class and implements the List interface.
• ArrayLists are created with an initial size, when this size is exceeded, it gets
enlarged automatically.
2 Object nextElement( )
This returns the next object in the enumeration as a generic Object reference.
Properties defaults;
1 Properties( )
This constructor creates a Properties object that has no default values
2 Properties(Properties propDefault)
creates an object that uses propDefault for its default values. In both cases, the property list is
empty
3 Enumeration propertyNames( )
Returns an enumeration of the keys. This includes those keys found in the default property list, too.