|
I could be wrong on this, but I think Vector came out before ArrayList. A lot of older sample code probably uses Vector. When I started using Java, I took the 5-day class from Sun (which didn't include much, if any, info on Collections). The rest I picked up as I used it or needed it. I use a lot of Vector and Hashtable, even though I know that ArrayList and HashMap are the preferred alternatives. It's just habit and laziness. The execution speed thing only matters when you're doing something so speed intensive that you notice. If you're not writing that kind of code, which a lot of people aren't, you can't tell the difference.
|