STL library like C++?
Author |
Message |
MysticVegeta
|
Posted: Sat Nov 26, 2005 11:45 pm Post subject: STL library like C++? |
|
|
Is there a standard template library in Java like C++ because I prefered using that over arrays. (wtd's long tutorial) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
wtd
|
Posted: Sat Nov 26, 2005 11:50 pm Post subject: (No subject) |
|
|
There are certainly collections classes. Things like Vector, ArrayList, etc., and there are classes which contain static methods for manipulating these, but there is no direct equivalent to the STL in Java.
Templates in C++ behave differently than Java's generics. |
|
|
|
|
|
MysticVegeta
|
Posted: Sun Nov 27, 2005 1:01 am Post subject: (No subject) |
|
|
are those better than using arrays though?, because i ammore experienced in arrays than STL |
|
|
|
|
|
wtd
|
Posted: Sun Nov 27, 2005 1:22 am Post subject: (No subject) |
|
|
Depends. Do you need something that can grow? If so, then using one of these classes likely represents significantly less overhead than dealing with the expansion issue yourself. |
|
|
|
|
|
|
|