Friday, July 31, 2009

Convert a word into an arraylist of characters in java?

In java I have an arraylist of words, and then I have a method which returns one of these words at random. I then have another method which creates an arraylist of characters. How can I take the random word generated and convert it into the arraylist of characters?

Convert a word into an arraylist of characters in java?
nameOfStringHere.toCharArray();
Reply:Why can't you just feed the value of the first function to the second one as an argument? (Sorry I'm a bit confused.) Maybe elaborate a bit...





Or is this what you're looking for: http://www.cs.princeton.edu/courses/arch...


No comments:

Post a Comment