Can somebody explain to me the most efficient way to read in data from a text file and organize it into an ArrayList<Point>?
Let's say I have a file called "points.txt" and I need to write a method that will read those values in to my program and organize them into an ArrayList<Point> that I can then return to my main. How would I go about doing that? I understand the basic function of IO, but I seem to be confused with the concept of Points, especially in an ArrayList. Thanks!
Are you talking about java.awt.Point or some other class? In any case, the first thing to do is figure out how to read the file a line at a time (assuming the text file is arranged so that the data for one Point appears on one line). Try just printing the lines as you read them at first.
The next thing you have to figure out is how to parse one line into the data you need for a Point, but don't worry about that until you get reading from the file working.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com