Results 1 to 4 of 4
- 11-12-2012, 01:36 AM #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 :) .
-
Re: .txt file to multidimensional array
Your loop should likely be a while loop that continues until the reader's readLine() method returns null. There are many examples of this to be found here and in other forums.
- 11-12-2012, 01:33 PM #3
Member
- Join Date
- Oct 2012
- Posts
- 64
- Rep Power
- 0
Re: .txt file to multidimensional array
Okay but the only problem I have is that there is no readLine() method it can only read one character at a time?
- 11-12-2012, 02:10 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Similar Threads
-
.txt file to multidimensional array
By Hazza in forum New To JavaReplies: 1Last Post: 11-13-2012, 04:37 PM -
Multidimensional Array
By TyCox94 in forum New To JavaReplies: 11Last Post: 09-25-2011, 11:00 PM -
Multidimensional Array help
By Gaebril in forum New To JavaReplies: 1Last Post: 04-09-2011, 08:36 PM -
initialize multidimensional array
By Aidoru in forum New To JavaReplies: 2Last Post: 12-04-2010, 01:00 PM -
Retrieve Multidimensional Array ??
By oneofthelions in forum New To JavaReplies: 3Last Post: 12-12-2009, 07:24 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks