943,918 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1876
  • Java RSS
Nov 22nd, 2008
0

read data into array using methods

Expand Post »
Hey all,
I need some help with an application which needs to read data into an array using methods and then write it back out into a 5x5 table

so i would read int 25 digits say: 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4


and it would print
0 1 2 3 4
5 6 7 8 9
0 1 2 3 4
5 6 7 8 9
0 1 2 3 4
Similar Threads
Reputation Points: 7
Solved Threads: 1
Newbie Poster
poggie is offline Offline
16 posts
since Nov 2008
Nov 22nd, 2008
0

Re: read data into array using methods

anyone
Last edited by poggie; Nov 22nd, 2008 at 5:11 pm.
Reputation Points: 7
Solved Threads: 1
Newbie Poster
poggie is offline Offline
16 posts
since Nov 2008
Nov 22nd, 2008
0

Re: read data into array using methods

Hello, beforehand, sorry for my english...
You can read your data into String, the split it by " ". And you'll have an array of symbols. To print it, you can use 2 cycles: (1st - from 0 to arrayLength; 2nd- from 0 to (columCount and arrayLength if you can have strings with not equal length))
Reputation Points: 293
Solved Threads: 82
Posting Whiz
Antenka is offline Offline
361 posts
since Nov 2008
Nov 22nd, 2008
0

Re: read data into array using methods

@Antenka: he doesn't want the logic behind the solution, he wants the code to be handed to him (and if possible, a nice degree to go with it)
Reputation Points: 935
Solved Threads: 356
Nearly a Posting Maven
stultuske is offline Offline
2,497 posts
since Jan 2007
Nov 23rd, 2008
0

Re: read data into array using methods

stultuske: I'm optimist, so I prefer to think, that he wants to get some knowleges
Reputation Points: 293
Solved Threads: 82
Posting Whiz
Antenka is offline Offline
361 posts
since Nov 2008
Nov 24th, 2008
0

Re: read data into array using methods

Click to Expand / Collapse  Quote originally posted by Antenka ...
stultuske: I'm optimist
we all started like that
but you'll see tons of questions like this where the thread-starter doesn't even bother to write the main-method himself..
Reputation Points: 935
Solved Threads: 356
Nearly a Posting Maven
stultuske is offline Offline
2,497 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Progress Bar problems
Next Thread in Java Forum Timeline: files





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC