What is Java collection Framework

Java programming topics
Post Reply
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

What is Java collection Framework

Post by Nipuna » Sun Jul 03, 2011 10:10 pm

what is Java collection Framework? :?

I saw some when searching as i can see it is like Linux Directory List. Like Home->usr and so on.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: What is Java collection Framework

Post by Neo » Sun Jul 03, 2011 10:49 pm

I saw some when searching as i can see it is like Linux Directory List. Like Home->usr and so on.
To start with, I don't see any relationship with this other than the use of LIST data structure which is available in Java collection Framework. It seems you didn't read the article completely. Just referred an example somewhere may be ;)

Okay. to start with, Java collections framework (JCF) is a set of classes and interfaces that implement commonly reusable collection data structures. People who are in to computing know very well about data structures. Stack, Queues, Lists, Trees (Many types), Graph, Hash, etc...

In good old days, we had to implement those ourselves. But now in Java, you have them already implemented. For example, if you need a queue (Last In First Out (LIFO) structure) for your application, then you can simply use java.util.Queue. If you have learned Data Structures & Algorithms already, you know what are these.

See the Oracle article Introduction to the Collections Framework.

Note that you need to carefully read from top to bottom. Don't try to read something from the middle and try to understand it.
User avatar
Nuwa
Sergeant
Sergeant
Posts: 12
Joined: Sat Dec 18, 2010 10:40 am
Location: Colombo,Srilanka

Re: What is Java collection Framework

Post by Nuwa » Mon Jul 04, 2011 7:55 am

The Collections Framework consists of three parts :)

1)Interfaces, the abstract data types that the framework supports.
2)Implementations, the concrete versions of these interfaces.
3)Algorithms, the predefined actions that can be defined on either the interfaces or their implementations.

1)All implementations are unsynchronized.
2)All implementations are serializable and can clone.
3)All implementations support having null elements.

For more:- http://download.oracle.com/javase/tutor ... index.html
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: What is Java collection Framework

Post by Nipuna » Mon Jul 04, 2011 8:23 am

Thanks Neo and Nuwa. :)

Actually I didn't read about Java Collection framework in Java I did as Neo said just viewed a Picture :) I didn't study the parts after the First Assignment of Java in BIT. Because There were so many Problems and I got low marks for Questions. So I stopped it for later Study. But I did Assignment some how and Passed :)

That's why I didn't understood it well. One thing for my lacking interest for Java is we can't get an input easily like other Languages. in C++ we can use

Code: Select all

cin>> 
But In java there is more to type and not easy like Any other Language That i know. :?
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

Re: What is Java collection Framework

Post by Saman » Mon Jul 04, 2011 1:15 pm

It is just that you haven't referred the most simplest points in Java. There are many methods for this and Java is very powerful in not only reading an input but also in verifying the data on the input. I started a new topic since I don't like to make the forum a mess by off-topic discussions ;)
See How to get an input from keyboard using Java.
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: What is Java collection Framework

Post by Nipuna » Mon Jul 04, 2011 3:06 pm

Thanks a Lot Saman
Post Reply

Return to “Java Programming”