• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Collections Framework  RSS feed

 
Nirmit Dalal
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Core Java programming practice i visited the CodingBat website and Euler project website. They both really helped me in understanding the various ways in which some basic api can be used. Now i wanted similar practice sessions for Collections Framework , any idea?
And with the presence of the Collection framework why does one still have to work with array the old style since unlike Collections they dont offer good efficiency and usability?
 
manish ghildiyal
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My personal experience is that debugging the collection API is best way to get hold of it.
Additionally, go through the articles and writeups to understand concepts of hashing,linkedlists, sorting etc.

Rgarding array vs collection, if you already know the number of data entities you need to store then don't you think
array is the best option around. And regarding efficiency, array provides you index based access and search which is surely
one of the fastest way of doing things. Infact many collection concrete classes themselves internally use arrays to store the data.


Manish
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One doesn't have to, unless one wants to. Most people would use the collection classes most of the time (though as Manish says, these will often use arrays internally).
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many beasts in the java.util.* zoo with different performance guarantees.

ArrayList is also there.

 
Bin Smith
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello @Nirmit Dalal !

I see that you are doing things in a right way because you start learning Java with Java core.

Specially for you and others who want to really know Java Collections I prepared tutorials on Java Collections.
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
who want to really know Java Collections


... might be better served with an overview than internals of the very types.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!