Results 1 to 8 of 8
Thread: how to store data in array
- 06-18-2011, 05:37 PM #1
Member
- Join Date
- May 2011
- Posts
- 39
- Rep Power
- 0
-
While we can't do your homework for you, we can help answer specific questions, and so on that note, can you tell us what specifically have you tried and what specifically has you stuck?
Last edited by Fubarable; 06-18-2011 at 05:47 PM.
- 06-18-2011, 05:51 PM #3
Member
- Join Date
- May 2011
- Posts
- 39
- Rep Power
- 0
hi,
in the tutorials I have seen I only saw how to create arrays and manually give them values but nowhere in the examples there was how to make a user input become a value in an array. I am completely stuck since I know how to create arrays and Input messaged but I do not know how to integrate both so that the entered data goes to the array
-
A lot will depend on how you plan to have the user enter data. Will they say be entering 5 numbers separated by a space on one line? Will they be entering each number individually on its own line? Will they be using a console program or a GUI? or JOptionPane?
If a console program with each number on its own line then what steps do you think you should do? I'll bet that you can work most of this out given what you already know. :)
-
Hint: a for loop works quite well with arrays since you can loop from 0 to the array's length and then fill in the array element inside of the loop.
- 06-18-2011, 06:19 PM #6
Member
- Join Date
- May 2011
- Posts
- 39
- Rep Power
- 0
unfortunately is much easier said than done, I would appreciate if you can give me a link to get a better idea from someone who did something similar
- 06-18-2011, 06:23 PM #7
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
- 06-18-2011, 06:24 PM #8
Member
- Join Date
- May 2011
- Posts
- 39
- Rep Power
- 0
Similar Threads
-
How can i store a data from Excel sheet to an array.
By deshmukh.niraj04 in forum New To JavaReplies: 0Last Post: 05-03-2011, 06:33 AM -
HOw to Store Data in An Array
By deshmukh.niraj04 in forum New To JavaReplies: 4Last Post: 04-06-2011, 04:00 AM -
store data into an array from a file
By chopo1980 in forum New To JavaReplies: 10Last Post: 11-13-2009, 09:48 AM -
Comparing two data types in order to store in array
By gwithey in forum New To JavaReplies: 3Last Post: 05-01-2009, 10:27 AM -
Store textfile data in an array
By mokonji in forum New To JavaReplies: 4Last Post: 02-22-2009, 05:28 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks