Saturday 22 October 2011

Collection Interfaces tutorial and collection Interface video free download

Collection Interfaces video tutorial




It is the root of collection hierarchy. A Collection includes a group of objects known as elements. Some Collection classes allows duplicate elements, and others do not. Some are ordered and others are unordered. All collection class implement Collection interfaces or subinterfaces.

Signature:
public interface Collection<E> extends Iterable<E>

Collection Interface extends Iterable interface

int size():Returns the number of elements in collection.

boolean isempty():Returns true only if collection is empty.

boolean Contains(Object o):Returns only if specified element is in the collection.

boolean add(Element e):This is used to add a single element to collection.This method true only when the element is added.

boolean remove(Object o):This element will remove specified element from collection. Returns true if the element is removed from collection.






1 comment: