Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
 
 
Search All Tutorials

 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Collections Framework

                         

Java provides the Collections Framework. In the Collection Framework, a collection represents the group of the objects. And a collection framework is the unified architecture that represent and manipulate collections. The collection framework provides a standard common programming interface to many of the most common abstraction without burdening the programmer with many procedures and interfaces. It provides a system for organizing and handling collections. This framework is based on:

  • Interfaces that categorize common collection types.
  • Classes which proves implementations of the Interfaces.
  • Algorithms which proves data and behaviors need when using collections i.e. search, sort, iterate etc.

Following is the hierarchical representation for the relationship of all four interfaces of the collection framework which illustrates the whole implementation of the framework.

                                       

During the designing of a software (application) it need to be remember the following relationship of the four basic interfaces of the framework are as follows:

  • The Collection interface which is the collection of objects. That permits the duplication of the value or objects.
  • Set is the interface of the collections framework which extends the Collection but forbids duplicates.
  • An another interface is the List which also extends the Collection. It allows the duplicates objects on different position because it introduces the positional indexing.
  • And Map is also a interface of the collection framework which extends neither Set nor Collection.

Some interfaces and classes of the collection framework are as follows:

INTERFACES CLASSES
Collection Interface
Iterator Interface
Set Interface
List Interface
ListIterator Interface
Map Interface
SortedSet Interface
SortedMap Interface
HashSet Class
TreeSet Class
ArrayList Class
LinkedList Class
HashMap Class
TreeMap Class
Vector Class
Stack Class

Every interfaces and classes are explained next in the roseidia.net java tutorial one by one in the various examples.

Advantage of the Collections Framework:

The collections framework offers developers the following benefits:

  • It increases the readability of your collections by providing a standard set of interfaces which has to be used by many programmers in different applications.
  • It makes your code more flexible. You can make the code flexible by using many interfaces and classes of the collection framework.
  • It offers many specific implementations of the interfaces. It allows you to choose the collection that is most fitting and which offers the highest performance for your purposes.

Interfaces of the collections framework are very easy to use. These interfaces can be transparently substituted to increase the developed application performance.

                         

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

7 comments so far (post your own) View All Comments Latest 10 Comments:

Thank u very much. I have learnt many things from your website. But I want to know the difference between Collections and Collections Framework. And provide some more examples for each topic.

Posted by Ponmerriterr on Tuesday, 03.25.08 @ 12:55pm | #54245

Hi
Can u explain with code how to use threads,collection framework and threads in a single program.

Posted by shahzad on Friday, 02.22.08 @ 11:05am | #49386

Hi,ur website is useful for beginners but it is not have sufficient information of j2me.if you provide with examples using API,it will be more useful for students.

Posted by Renuka on Thursday, 01.24.08 @ 16:57pm | #46013

Hi,ur website is useful for beginners but it is not have sufficient information of j2me.if you provide with examples using API,it will be more useful for students.

Posted by Renuka on Thursday, 01.24.08 @ 16:56pm | #46012

yes the website is good but you all are baa....llll

Posted by a_56 on Thursday, 09.27.07 @ 23:50pm | #30097

how to change the shape in the JButton.
for example to design Oval shape Button.

Posted by sivakumar on Saturday, 06.23.07 @ 15:17pm | #20023

The website. This kind of a website, ' was looking for. Exceptional one, good explanation, covers almost all fundamentals to develop an application. Humble suggestion is, it would be much simpler, (' believe), if all the buzz words, technical terms are explained (with a simple example) before using them.

Wonderful website.

Thanks alot

Posted by Sridharan on Monday, 06.11.07 @ 02:53am | #18850

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Hot Web Programming Job

Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.