Search:

Type: Posts; User: sp11k3t3ht3rd

Search: Search took 0.12 seconds.

  1. Re: loading things from a text file into an array list

    I added a line that prints out the array elements. And here's what it prints out:



    Does anyone have any ideas because I got really confused by putting this debug statement in.
  2. Re: loading things from a text file into an array list

    Hey, I just was playing around with the program and it only loads 1 thing from the text file. If you have more than 1 thing in it, it doesn't get loaded. Any ideas? I changed the code to this:

    ...
  3. Re: loading things from a text file into an array list

    Thanks so much!
  4. Re: loading things from a text file into an array list

    I meant that when I saved the array list to the file its format was [a,b,c]. I said that I knew you could take the brackets off after the file was saved (making the saved file look like "a,b,c") but...
  5. Re: loading things from a text file into an array list

    This is the userInput class:


    import java.io.*;

    public class userInput {

    String input = null;

    public String getUserInput(String prompt) {
  6. Re: loading things from a text file into an array list

    I saved a,b,c in the text file which came to [a,b,c]. When I loaded it did this:
  7. loading things from a text file into an array list

    I'm trying to work out a way to save stuff in a text based game i'm making. The players inventory is an Array List. I worked out how to save the contents of it to a txt file but I have absolutely no...
Results 1 to 7 of 7