This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Can Java do a <Read x,y   Data 1,2> like in old DOS? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Can Java do a <Read x,y   Data 1,2> like in old DOS?" Watch "Can Java do a <Read x,y   Data 1,2> like in old DOS?" New topic
Author

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

Ken Perrine
Greenhorn

Joined: Oct 25, 2012
Posts: 4
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

Joined: Oct 29, 2001
Posts: 8264

Welcome to the JavaRanch. Are you asking how to create a literal array?

That's an array with two rows and three columns.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Ken Perrine
Greenhorn

Joined: Oct 25, 2012
Posts: 4
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Can Java do a <Read x,y Data 1,2> like in old DOS?
 
Similar Threads
Object design and use question
Deserializing Visual Basic 6 files in Java?
Text file problem
background bleed-through when using getInsets.
replacing content in a file