aspose file tools
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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need some help!!!" Watch "Need some help!!!" New topic

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

Joined: Oct 02, 2003
Posts: 11646

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

Joined: Jan 10, 2002
Posts: 62112

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:
subject: Need some help!!!