aspose file tools*
The moose likes Beginning Java and the fly likes plz delete Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "plz delete" Watch "plz delete" New topic
Author

plz delete

C Ho
Greenhorn

Joined: Dec 15, 2002
Posts: 16
plz delete
[ December 04, 2004: Message edited by: C Ho ]
Barry Higgins
Ranch Hand

Joined: Jun 05, 2003
Posts: 89
First thing you'll need to do is to read in your text file and capture the data in a String .. I assume that each Shape will at least be on a different line in the text file.
Then you'll need to parse the String using the split command this will give you a sinle dimension array for each String. If you can get that far you'll be 90% of the way there.
Have a go at reading in the file first and if you are having problems post back.
Good luck,
Barry
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
What have you tried so far? You probably need to use FileInputStream, FileReader, or some other classes from the java.io package. That's where I suggest you start.

Keep Coding!

Layne


Java API Documentation
The Java Tutorial
C Ho
Greenhorn

Joined: Dec 15, 2002
Posts: 16
"First thing you'll need to do is to read in your text file and capture the data in a String .. I assume that each Shape will at least be on a different line in the text file.
Then you'll need to parse the String using the split command this will give you a sinle dimension array for each String."

Are there any examples? I find that I learn best with example, else I just sit on a chair coding for hours, days, weeks without progress because I simply do not know what Im doing!
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Do you have a textbook? It should have plenty of examples. You may also want to see if the Java Tutorial has something appropriate to help you. Also, the links to the Java API documentation I gave above have a lot of helpful information, even if there are not full code examples.

Layne
C Ho
Greenhorn

Joined: Dec 15, 2002
Posts: 16
No textbook, school is really crappy..
C Ho
Greenhorn

Joined: Dec 15, 2002
Posts: 16
this is what i have so far:



I keep getting this error though, can someone please help me?

Error: cannot resolve symbol
symbol : class IOException
location: class ReadFileToArray
C Ho
Greenhorn

Joined: Dec 15, 2002
Posts: 16
hello?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
It may be as simple as adding an import at the top of the class ... right after package if you have one, right before class.

import java.io.IOException;


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
C Ho
Greenhorn

Joined: Dec 15, 2002
Posts: 16
thanks
, now i can finally see how this makes sense
[ December 04, 2004: Message edited by: C Ho ]
 
jQuery in Action, 2nd edition
 
subject: plz delete