Results 1 to 2 of 2
- 11-11-2012, 09:19 PM #1
Member
- Join Date
- Oct 2012
- Posts
- 64
- Rep Power
- 0
.txt file to multidimensional array
I have a .txt file that contains either i's or j's. There are 7000 characters in total which are all either i or j. I need to place these into an array where each row is 70 characters long and there are a 100 rows in total. I have a custom package based on the buffered reader which can read in the values. I am pretty sure I need to use a loop to loop through all the character values but I am lost as to what loop to use and how to use it in the correct way. Any help would be greatly appreciated :) .
Last edited by Hazza; 11-11-2012 at 09:21 PM.
- 11-13-2012, 04:37 PM #2
Re: .txt file to multidimensional array
There are essentially two types of loop - counting loops when the set size is known, and conditional loops where looping is infinite until a condition is met. A for-loop is a great example of a counting loop, as it loops i times, where i is a number you predefine. A while-loop is the other kind and terminates based on a boolean condition.
Which type of loop do you think you need and why?
Similar Threads
-
Multidimensional Array
By TyCox94 in forum New To JavaReplies: 11Last Post: 09-25-2011, 11:00 PM -
Multidimensional char array
By leepikamukharji in forum New To JavaReplies: 18Last Post: 04-13-2011, 01:18 PM -
Multidimensional Array help
By Gaebril in forum New To JavaReplies: 1Last Post: 04-09-2011, 08:36 PM -
Multidimensional array - swap
By BeginnerNoob in forum New To JavaReplies: 13Last Post: 03-30-2011, 03:02 PM -
[SOLVED] Multidimensional array
By Torgero in forum New To JavaReplies: 20Last Post: 03-22-2009, 11:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks