Stephan van Hulst wrote:Hi Steve,
A couple of things.
- Vectors are obsolete. Use Lists instead.
I wouldn't count them as "obsolete". If they were that, then they'd be marked "deprecated". However - as the JavaDocs indicate - they're no longer the preferred list implementation. Vectors carry thread-safety overhead, so an ArrayList is a lighter option when you don't need
thread safety. Vector was retor-fitted to better integrate with the Collections (which didn't exist when Vector was first defined). Which is why Vector has 2 ways to traverse - the original Enumeration and the newer (Collection-style) Iterator.
Stephan van Hulsy wrote:
- Please don't use File for paths. Use Path for paths.
What is "Path"? Can you provide the fully-qualified classname? Because I've used java.io.File to hold and manipulate paths for years and I'm not aware of anything having replaced it.
The java.io.File class is perhaps imprecisely-named anyway. You don't really do I/O on a java.io.File, you use it as a basis for opening an I/O channel.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.