Newbie Java array question

Status
You're currently viewing only Faramir's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

Faramir

Ars Legatus Legionis
36,356
Subscriptor
Java is no longer a young language and there is a lot of legacy code out there. I think if the designers had their druthers native arrays would have been deprecated in favor of the collection classes (I bet they'd like to get rid of all primitives). But in the early going when they were trying to attract programers to this new language having a native array class was necessary for people coming over from C++ (at the time STL was not in widespread use).

In any event any sort of collection implementation is going to have trade-offs. Some are optimized for lookups, some for sorting, some for adding and subtracting elements ect. Take a look at the chart on this page: http://www.coderfriendly.com/2009/05/12 ... heatsheet/ for a good overview.
 
Status
You're currently viewing only Faramir's posts. Click here to go back to viewing the entire thread.
Not open for further replies.