File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes My code saves 2D wrongly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "My code saves 2D wrongly" Watch "My code saves 2D wrongly" New topic
Author

My code saves 2D wrongly

goodspeed ayt
Greenhorn

Joined: Apr 27, 2013
Posts: 1
Help please I need my code to write 2D array to a text file also read from text. I manage to get it to store in the arraylist... so the characters are in the format
BBRRL
BBBBB
LLLBB
which are rows and columns. but when I try to keep it in the array list it prints the characters upside down so I use a trick which I think is wrong my printing j before i... it is suppose to be i before j. doing that it came out the way i wanted it... but when i save the file and look how it is stored in the text file i see different thing... even worst than what was in the arraylist.

here are my codes... and please can someone help me write a read method... to read from a text file into the 2d array. thanks.



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My code saves 2D wrongly