File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can Java do a <Read x,y Data 1,2> like in old DOS?

 
Ken Perrine
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, I like the rules required for this forum!
I am new to Java.
I am re-writing some very old QBasic DOS programs to Java (and have programmed other things in VB6). In the older DOS versions you could use a READ statement followed by a matching number of DATA text/FP/integers rather than reading in from a file. I couldn't figure out how to do it in VB6, and now can't figure it out in JAVA. For some routines where I'm reading in an array of, say, x(5,4) numbers, it would be easier to imbed in the program rather than writing a text file and having the program read the file.
Can one do it in Java? How, or an brief example?
Thanks,
And have an Old Moosedrool beer (Bozeman microbrewery) on me if you know,
Ken
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch. Are you asking how to create a literal array?

That's an array with two rows and three columns.
 
Ken Perrine
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is the fastest response I have ever received! And the most concise, vs. my logorrhea... Yes, it is what I was looking for, and much easier than expected. Thanks.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic