wood burning stoves*
The moose likes Beginning Java and the fly likes Need some help!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need some help!!!" Watch "Need some help!!!" New topic
Author

Need some help!!!

John Lockheart
Ranch Hand

Joined: Oct 13, 2006
Posts: 115
i'm trying to read data from a text file and use it to fill a matrix. The organization is as follows: The first row has two integers corresponding to rows and columns. The remaining lines of the file contain zero or more values, separated by blank space. Values go into the next available position in the array, filling rows from left to right and moving to the next row when a row is full. There can only be 3 possibilities, ints, a int1*int2 case (value int2 will be used int1 times), and a string (which should just get skipped).





Haven't tried tackling the issue of the "3*5" case yet.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11153
    
  16

i'm sorry, but i don't see what your question is.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
John Lockheart
Ranch Hand

Joined: Oct 13, 2006
Posts: 115
sorry, i thought i was more explanatory then i was in my comments inside the code. My question was, how would I go about using the first line as paramaters for my vector, then skip it completely when assigning values into my vector?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60773
    
  65

It's also easier to understand what you are asking if you use a more meningful subject title than "need help". Please read this for more info.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need some help!!!
 
Similar Threads
unable to exit program..
BufferedReader & StringTokenizer
Need a little help...
Manipulating Vectors (code not working)
Blank lines in file throwing exception