read data into array using methods

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2008
Posts: 16
Reputation: poggie is an unknown quantity at this point 
Solved Threads: 1
poggie poggie is offline Offline
Newbie Poster

read data into array using methods

 
0
  #1
Nov 22nd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 16
Reputation: poggie is an unknown quantity at this point 
Solved Threads: 1
poggie poggie is offline Offline
Newbie Poster

Re: read data into array using methods

 
0
  #2
Nov 22nd, 2008
anyone
Last edited by poggie; Nov 22nd, 2008 at 5:11 pm.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 254
Reputation: Antenka has a spectacular aura about Antenka has a spectacular aura about Antenka has a spectacular aura about 
Solved Threads: 65
Antenka's Avatar
Antenka Antenka is offline Offline
Posting Whiz in Training

Re: read data into array using methods

 
0
  #3
Nov 22nd, 2008
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))
So what if you can see the darkest side of me?
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: read data into array using methods

 
1
  #4
Nov 22nd, 2008
@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)
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 254
Reputation: Antenka has a spectacular aura about Antenka has a spectacular aura about Antenka has a spectacular aura about 
Solved Threads: 65
Antenka's Avatar
Antenka Antenka is offline Offline
Posting Whiz in Training

Re: read data into array using methods

 
0
  #5
Nov 23rd, 2008
stultuske: I'm optimist, so I prefer to think, that he wants to get some knowleges
So what if you can see the darkest side of me?
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: read data into array using methods

 
0
  #6
Nov 24th, 2008
Originally Posted by Antenka View Post
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..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC