
-----------------------------------
MysticVegeta
Sat Nov 26, 2005 11:45 pm

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)

-----------------------------------
wtd
Sat Nov 26, 2005 11:50 pm


-----------------------------------
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
Sun Nov 27, 2005 1:01 am


-----------------------------------
are those better than using arrays though?, because i ammore experienced in arrays than STL

-----------------------------------
wtd
Sun Nov 27, 2005 1:22 am


-----------------------------------
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.
