Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Is there an easy way to save data?

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Thanked 0 Times in 0 Posts

    Default Is there an easy way to save data?

    In school, I'm taking a java independent study course, so all of the software downloading and whatnot is managed by the network technician. All that I have access to is iTerm on a mac, which has a compiler and all the basic necessities of programming already installed on it. The other person in my class and myself were wondering if there was an easy way to store data entered by the user to another file, which can be loaded up and used by a program when it's started. For example, if I were to write a program that asks the user to enter questions and the correct answer to the questions, and then begins randomly choosing questions that the user entered to quiz him on, would it be possible to easily store the questions so that they don't have to be re-entered each time the program is started? Unfortunately, we don't have the ability to use SQL or any database of that sort, so we're trying to create a makeshift one ourselves.

  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    My Mood
    Thanked 167 Times in 158 Posts

    Default Re: Is there an easy way to save data?

    You could write you data out as plain text to a text file using FileWriter. Or you could have your classes implement Serializable and save the objects using ObjectOutputStream.
    Improving the world one idiot at a time!

Similar Threads

  1. [SOLVED] How do I save organized data and store it locally?
    By angstrem in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: March 15th, 2013, 11:57 AM
  2. trying to save data onto a file
    By DanTheSand in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: December 13th, 2011, 09:58 AM
  3. HELP PLEASE! How to save and call back user data input.
    By boi_boi in forum What's Wrong With My Code?
    Replies: 4
    Last Post: August 12th, 2011, 02:21 PM
  4. HELP PLEASE! How to save and call back user data input.
    By boi_boi in forum Object Oriented Programming
    Replies: 3
    Last Post: August 12th, 2011, 04:42 AM
  5. Save data entered upon reopening
    By SHStudent21 in forum Java Theory & Questions
    Replies: 1
    Last Post: February 12th, 2011, 10:24 PM