This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I think you mean how do you write what's IN the object to a text file, right? In this case you don't have to cast them to Strings, they are already Strings. If you mean a single step to return the instance variables as a single String, you could override the toString() method of X to put them all together in one String: In X...
Or something like that depending on your needs. Then you have a choice of whether you want to build a big String(delimited by newlines) and write it to the file all at once, or write once for each object in the Vector. Check out these links for writers: BufferedWriter FileWriter PrintWriter HTH, E
My theory of evolution is that Darwin was adopted. - Steven Wright