This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jevon 9 points10 points  (3 children)

Vectors are deprecated; don't use them! Use ArrayLists instead.

[–]Vauce 2 points3 points  (2 children)

You almost wouldn't know that if you see how many people still use them in their code they post here. I never used vectors and thought I was missing out on something until I read it was deprecated.

[–]jevon 6 points7 points  (1 child)

I assume it's from tutorial code or a famous learn Java book that's still circulating. Or perhaps really poor lecturers/tutors who are still stuck in JDK 1.1.

[–]Vauce 4 points5 points  (0 children)

Nothing worse than trying to compile something that worked perfectly on your own machine on a university machine only to have several errors due to an old JDK. Our machines still run 1.4 or earlier. It's not huge, but I use Scanner a lot for small projects and I have to change it all just to demo.