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: Append data from user input into array

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Thanked 0 Times in 0 Posts

    Default Append data from user input into array

    I need a little help with this assignment. I'm trying to figure out what the code is for appending a user input into arrays. There are 3 arrays (String, double, and int), and each of them has a size of 100. I'm using a switch statement; when a user keys 1 and hits enter, it will prompt the user for the string value (for the string array), the double value (for the double array) and then the int value (for the int array). I keep overwriting the first element of each array (obviously). The question is, how do I append it to the next available empty slot in the array? Btw this is all done in a console, so no GUI.

  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    United Kingdom
    My Mood
    Thanked 294 Times in 227 Posts
    Blog Entries

    Default Re: Append data from user input into array

    Welcome to the forums.

    Please show us the code you have written so far..

    Don't forget to add the [highlight=Java] code [/highlight] tags.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. 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
  2. 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
  3. Valid user input
    By ChristopherLowe in forum Java Programming Tutorials
    Replies: 1
    Last Post: June 21st, 2011, 04:53 PM
  4. How to append data to an already existing file?
    By siteregsam in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: May 3rd, 2010, 02:31 PM
  5. User Input Loop
    By cfmonster in forum Loops & Control Statements
    Replies: 7
    Last Post: August 24th, 2009, 01:52 PM